PHPackages                             dougallwinship/unicodez - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. dougallwinship/unicodez

ActiveLibrary

dougallwinship/unicodez
=======================

unicodez library

v0.1.0-alpha(2d ago)11↓100%UnlicensePHPPHP &gt;=8.3

Since Apr 6Pushed 2d ago1 watchersCompare

[ Source](https://github.com/DougallWinship/unicodez)[ Packagist](https://packagist.org/packages/dougallwinship/unicodez)[ RSS](/packages/dougallwinship-unicodez/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Unicodez
========

[](#unicodez)

Encode/decode text to/from various Unicode character sets (ranges) using a seed for some reason 🤷

For example "this is a test" encoded as Runic with a seed of 1 (using a pseudo shebang to integrate the seed number) gives: ᚡ﻿ᛚᛁᛖᚰᛡᛑᚮᛅᛈᛉᛡᛑᚮᛅᛈᛉᛊᛔᛈᛉᛚᛁᛟᛩᚮᛅᛚᛁ

...or "Why am I looking at this project? I probably need to rethink my priorities." encoded with Flags and a seed of 13 (without a pseudo-shebang) results in:
🇹🇴🇧🇫🇱🇾🇲🇾🇰🇮🇰🇬🇸🇮🇸🇧🇬🇬🇵🇪🇩🇪🇩🇪🇸🇮🇸🇧🇲🇼🇾🇪🇸🇮🇸🇧🇦🇷🇬🇶🇬🇷🇧🇧🇬🇷🇧🇧🇸🇳🇮🇲🇦🇲🇨🇾🇧🇷🇯🇪🇹🇳🇵🇾🇸🇮🇸🇧🇬🇬🇵🇪🇩🇿🇲🇼🇸🇮🇸🇧🇩🇿🇲🇼🇱🇾🇲🇾🇦🇲🇨🇾🇨🇿🇸🇰🇸🇮🇸🇧🇻🇪🇸🇳🇫🇷🇮🇲🇬🇷🇧🇧🇮🇶🇬🇭🇧🇼🇲🇨🇬🇧🇲🇻🇩🇿🇲🇼🇸🇻🇩🇯🇸🇮🇸🇧🇲🇼🇾🇪🇸🇮🇸🇧🇻🇪🇸🇳🇫🇷🇮🇲🇬🇷🇧🇧🇪🇷🇬🇩🇬🇬🇵🇪🇪🇷🇬🇩🇦🇷🇬🇶🇰🇮🇰🇬🇸🇮🇸🇧🇧🇷🇯🇪🇧🇼🇲🇨🇧🇼🇲🇨🇰🇿🇧🇿🇸🇮🇸🇧🇩🇿🇲🇼🇬🇷🇧🇧🇸🇮🇸🇧🇫🇷🇮🇲🇧🇼🇲🇨🇩🇿🇲🇼🇱🇾🇲🇾🇦🇲🇨🇾🇧🇷🇯🇪🇸🇳🇮🇲🇸🇮🇸🇧🇩🇪🇩🇪🇰🇮🇰🇬🇸🇮🇸🇧🇻🇪🇸🇳🇫🇷🇮🇲🇦🇲🇨🇾🇬🇷🇧🇧🇫🇷🇮🇲🇦🇲🇨🇾🇩🇿🇲🇼🇦🇲🇨🇾🇧🇼🇲🇨🇨🇿🇸🇰🇸🇷🇵🇰

> IMPORTANT : Note that currently only 8-bit encoding is supported, which is sufficient to cover ASCII, but not much more!

Getting started:
----------------

[](#getting-started)

The project uses composer to generate a PSR-4 autoloader, so to get started simply

```
composer install

```

There a single dependency on [php-cli-tools](https://github.com/wp-cli/php-cli-tools).

Usage:
------

[](#usage)

As indicated there are two types of encoding:

### 1. Using a pseudo-shebang

[](#1-using-a-pseudo-shebang)

- this integrates the seed into the encoded text, meaning it can be decoded without knowing the seed.
- the pseudo-shebang indicates both the encoding range (set) and the seed used, a zero-width no-break space (U+FEFF) is used to delimit the pseudo-shebang.
- hence this technique cannot be used for obfuscation, and is essentially just for amusement!
- example:

```
$unicodez = new \Unicodez\ShebangUnicodez();
$encoded = $unicodez->encode("This is some text", \Unicodez\Mappings::TEXT_RUNIC, 123);
$decoded = $unicodez->decode($encoded)
```

### 2. Using an explicit seed

[](#2-using-an-explicit-seed)

- this means the seed must be known to decode the encoded text.
- hence this technique can be used for basic obfuscation.
- example:

```
$unicodez = new \Unicodez\SeedUnicodez();
$encoded = $unicodez->encode("This is some text", \Unicodez\Mappings::TEXT_RUNIC, 123);
$decoded = $unicodez->decode($encoded, 123)
```

Tools/Examples
--------------

[](#toolsexamples)

You can mount /public on a local webserver, or use the PHP webserver:

```
cd public
php -S localhost:8000

```

and look at:

- [Shebang Encoder/Decoder](./public/shebang-encoder-decoder.php) translate to/from the shebang unicodez text
- [Shebang Encode/Decode Test](./public/shebang-encode-decode-test.php) basic HTML test of each set using a shebang
- [Shebang Autoload Test](./public/shebang-autoload-test.php) show unicodez shebang autoloading in practice
- [Seed Encoder/Decoder](./public/seed-encoder-decoder.php) translate to/from the seeded unicodez text
- [Seed Encode/Decode Test](./public/shebang-encode-decode-test.php) basic HTML test of each set using a seed
- [Seed Autoload Test](./public/shebang-autoload-test.php) show unicodez seed autoloading in practice

Include/Autoloader
------------------

[](#includeautoloader)

Since this is implemented in PHP an include method and autoloader are also provided:

These both attempt to decode and evil eval the content.

[Here](./public/shebang-autoload-test.php) is an example of using the shebang autoloader:

> This attempts to add a reasonably sensible autoloader at the start of the PHP autoloader chain (using the prepend attribute), the hope is that you may be able to annoy/confound your colleagues/enemies by providing php implementations like [the Runic autoload test script](./src/Runic/ShebangRunicTest.php).

> Obviously without a suitable plugin your IDE will be unable to assist with auto-completion etc...

Here is how to use the shebang include method:

```
$unicodez = new \Unicodez\ShebangUnicodez();
$unicodez->include("/src/Runic/SeedRunicTest");
```

[Here](./public/seed-autoload-test.php) is an example using the seeded autoloader.

Here is how to use the seed include method:

```
$unicodez = new \Unicodez\SeedUnicodez();
$unicodez->include("/src/Runic/SeedRunicTest", 1);
```

> Note that in this case you *must* provide a seed for decoding, the mapping is determined automatically, but the seed can be kept secret in order to provide trivial obfuscation.

Command Line Tool
-----------------

[](#command-line-tool)

There is a command line tool which can be used to bulk encode/decode files.

Example of shebang encoding all files in a directory into Runic with prompts and backups:

```
./unicodez encode --target ~/Temp --flavour shebang --map Runic --seed 123 --write --verbose
```

Example of silently decoding all encoded files in a directory:

```
./uncodez decode --target ~/Temp --silent
```

The following commands are available:

- help
- version
- status
- encode
- decode
- cache-clear

PSR-12
------

[](#psr-12)

The code largely conforms to the [PSR-12](https://www.php-fig.org/psr/psr-12/) standard.
This is the tool that is used to check : [https://github.com/PHPCSStandards/PHP\_CodeSniffer/](https://github.com/PHPCSStandards/PHP_CodeSniffer/)
Once installed and available globally (presumably via PATH settings), something like this can be used from the root dir:

```
phpcs --standard=PSR12 ./src/Unicodez/

```

###  Health Score

38

—

LowBetter than 84% of packages

Maintenance99

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 90.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc54bed76111a71ec3af38c70b272446aa6d1c69e370acf548b1391a1e3d68fc?d=identicon)[DougallWinship](/maintainers/DougallWinship)

---

Top Contributors

[![DougallWinshipRO](https://avatars.githubusercontent.com/u/64647705?v=4)](https://github.com/DougallWinshipRO "DougallWinshipRO (19 commits)")[![DougallWinship](https://avatars.githubusercontent.com/u/13850171?v=4)](https://github.com/DougallWinship "DougallWinship (2 commits)")

### Embed Badge

![Health badge](/badges/dougallwinship-unicodez/health.svg)

```
[![Health](https://phpackages.com/badges/dougallwinship-unicodez/health.svg)](https://phpackages.com/packages/dougallwinship-unicodez)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M318](/packages/wp-cli-wp-cli)[indatus/dispatcher

Schedule your artisan commands within your application's source code

1.1k855.3k2](/packages/indatus-dispatcher)[clickalicious/phpmemadmin

phpMemAdmin - Bringing Memcached to the web

5076.0k](/packages/clickalicious-phpmemadmin)[jeremykendall/password-validator

Password Validator validates password\_hash generated passwords, rehashes passwords as necessary, and will upgrade legacy passwords.

14469.9k3](/packages/jeremykendall-password-validator)[qtism/qtism

OAT QTI-SDK

86193.8k7](/packages/qtism-qtism)[niels-de-blaauw/php-doc-check

Command line tool that identifies code that needs documentation.

43236.3k4](/packages/niels-de-blaauw-php-doc-check)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
