A collection of Elixir libraries that bring the Unicode standard to the BEAM.
The libraries here implement parts of the Unicode Character Database, CLDR, several Unicode Technical Standards and the Unicode inflection project, tracking Unicode 17.0. They are designed to compose: lower-level packages expose the data and primitives, higher-level packages build locale-aware string and language operations on top.
| Library | Hex | Description |
|---|---|---|
| unicode | Introspection of the Unicode character database with fast binary-search codepoint lookups, guards, and a wide range of enumerated and boolean properties. | |
| unicode_set | Unicode Sets and regexes for use in guards, compiled patterns, nimble_parsec combinators and regexes. |
|
| unicode_string | Locale-aware case folding and mapping, case-insensitive equality, and word, line, grapheme and sentence breaking with streaming. | |
| unicode_transform | Script transliteration, normalization, case mapping and arbitrary CLDR transforms. | |
| unicode_inflection | Grammatical inflection of words and phrases by number, gender, case and definiteness, grammatical feature queries, and pronoun selection, from the Unicode inflection project data. 31 languages pass the complete upstream conformance suites. | |
| unicode_idna | Pure-Elixir UTS #46 (IDNA 2008) with Punycode (RFC 3492), bidi (RFC 5893) and CONTEXTJ joiner rules. | |
| unicode_unihan | Introspection of the Unicode Unihan character database, with properties autogenerated from UAX #38. |
Note: The
unicode_guardspackage is deprecated. As ofunicodev2.0 theUnicode.Guardsmodule is provided byunicodedirectly — depend onunicodeand dropunicode_guardsfrom your dependencies.
- Looking up properties of a codepoint — start with
unicode. - Matching codepoints in function guards — the
Unicode.Guardsmodule inunicode, orunicode_setfor custom set-based guards. - Case mapping, folding, or segmenting strings —
unicode_string. - Transliterating between scripts or running CLDR transforms —
unicode_transform. - Inflecting words, phrases and pronouns for grammatically correct messages —
unicode_inflection. - Encoding internationalized domain names —
unicode_idna. - Working with CJK ideographs —
unicode_unihan.