Iconvex Unicode
iconvex_unicode adds 17 pure-Elixir byte-stream codecs and two logical
non-octet Unicode formats to Iconvex.
The OTP application publishes the complete name set in one transaction.
The package includes:
- BOCU-1, CESU-8, SCSU, UTF-1, UTF-EBCDIC, and WTF-8.
- Historical 31-bit FSS-UTF (
UTF-2). - Draft UTF-5 and whole-hostname UTF-6.
- Strict Formal SignWriting in ASCII (
FSW). - Explicit Iconvex UTF-16 and UTF-32 signature profiles.
- RFC 4042 UTF-9 and UTF-18, both as packed bitstrings and explicit endian-safe byte transports.
{:ok, compressed} = Iconvex.convert("日本語", "UTF-8", "BOCU-1")
{:ok, "日本語"} = Iconvex.convert(compressed, "BOCU-1", "UTF-8")
{:ok, packed_nonets} = Iconvex.Unicode.UTF9.encode_packed([?A, 0x0391, 0x10330])
{:ok, [?A, 0x0391, 0x10330]} = Iconvex.Unicode.UTF9.decode_packed(packed_nonets)
{:ok, fsw} = Iconvex.Unicode.FormalSignWriting.encode([0x40001])
{:ok, "S10000"} = {:ok, fsw}
Bare UTF-9 and UTF-18 are not byte-registry names.
Use UTF-9-16BE, UTF-9-16LE, UTF-18-24BE, or UTF-18-24LE with Iconvex.convert/4.
Call the logical modules for native packed bitstrings.
Development
Use the local Core checkout in this monorepo:
ICONVEX_PATH=../iconvex mix test
The runtime implementation uses LGPL-2.1-or-later.
NOTICE describes retained source records and Internet-Draft notices.
Complete codec catalog
The generator builds this table from the release inventories. Do not edit this section by hand. Codec names ignore ASCII letter case. You can use each alias to look up its codec. Aliases do not increase the canonical codec count.
17 canonical codecs · 33 aliases · 50 accepted names.
Registered codec names
| Canonical codec | Accepted aliases | Stateful |
|---|---|---|
BOCU-1 | BOCU1csBOCU-1 | Yes |
CESU-8 | CESU8csCESU-8 | No |
FSS-UTF | UTF-2 | No |
FSW | FORMAL-SIGNWRITING-ASCIIFORMAL-SIGNWRITING-IN-ASCIIFSW-2012FSW-ASCII | No |
ICONVEX-UTF-16-SIGNATURE-LE-DEFAULT | ICONVEX_UTF_16_SIGNATURE_LE_DEFAULT | Yes |
ICONVEX-UTF-32BE-SIGNATURE | ICONVEX_UTF_32BE_SIGNATURE | Yes |
ICONVEX-UTF-32LE-SIGNATURE | ICONVEX_UTF_32LE_SIGNATURE | Yes |
SCSU | csSCSU | Yes |
UTF-1 | csISO10646UTF1ISO-10646-UTF-1ISO-IR-178UTF1 | No |
UTF-18-24BE | UTF-18-24-BEUTF18-24BE | No |
UTF-18-24LE | UTF-18-24-LEUTF18-24LE | No |
UTF-5 | DRAFT-JSENG-UTF5-01UTF5 | No |
UTF-6 | DRAFT-IETF-IDN-UTF6-00UTF6 | No |
UTF-9-16BE | UTF-9-16-BEUTF9-16BE | No |
UTF-9-16LE | UTF-9-16-LEUTF9-16LE | No |
UTF-EBCDIC | UTFEBCDICUTF_EBCDIC | No |
WTF-8 | WOBBLY-TRANSFORMATION-FORMAT-8WTF8 | No |
Logical non-octet codecs
2 logical codecs · 0 aliases · 4 byte transports. These codecs keep their specified unit width. The byte transports provide explicit registry-compatible forms. They do not add logical codecs.
| Logical codec | Accepted aliases | Unit bits | Byte transports |
|---|---|---|---|
UTF-18 | — | 18 | UTF-18-24BEUTF-18-24LE |
UTF-9 | — | 9 | UTF-9-16BEUTF-9-16LE |