As of unicode_set version 1.4.0, Elixir 1.12 or later is required.
Unicode Set 1.7.0
This is the changelog for Unicode Set 1.7.0 released on July 9th, 2026. For older changelogs please consult the release tag on GitHub
Bug Fixes
Backslash-letter escapes are decoded correctly:
\a \b \e \f \v \t \n \rmap to their control codes, and any other\<char>maps to that literal character. Previously\a–\fsilently decoded to the wrong codepoint and\g–\z/\U/\wraised.Unicode.Set.parse/1returns{:error, _}for genuinely unsupported syntax (\N{...},\p{emoji=value}, multi-codepoint\u{...}) instead of raising, restoring its documented tagged-tuple contract.The empty set
[-]now reduces to{:in, []}and its consumers (to_pattern/1,to_utf8_char/1,to_regex_string/1) return an empty result or a never-matching regex instead of crashing.A union of complements such as
[[^a][^b]]now reduces correctly (per De Morgan) and no longer crashesto_regex_string/1or thematch?/2search-tree path.to_pattern/1andcompile_pattern/1return a tagged error for complement ([^...]) sets rather than raising; the!variants continue to raise.Unicode.Set.match?/2and the search tree no longer crash when matched against an empty string, andgenerate_matches/2no longer crashes on a complement set.Set operations now bind strictly left-to-right, including across an implicit-union boundary:
[[a-f]-[b][g]&[g-z]]is now{g}and the README precedence example evaluates as documented. Previously a trailing&or-bound only to its immediate neighbour.union/2merges overlapping and adjacent ranges, so a union feeding a difference or intersection no longer retains codepoints that should have been subtracted;symmetric_difference/2is likewise correct for overlapping inputs.Reversed character ranges (
[z-a]) and mismatched-length string ranges ([{abc}-{de}]) are rejected with a clear error instead of being silently accepted.String members and string ranges are PCRE-escaped when emitted as a regex, so
[{a.c}]matches the literal string and sets containing regex metacharacters no longer produce an uncompilable pattern (RE-1).Sets of multiple string members no longer emit a bogus empty
[[][]]class, and string-range alternations are wrapped in(?:...)so they compose correctly when embedded in a larger regex (SR-1, RE-4).Character ranges with a surrogate endpoint are clipped rather than emitting a dangling
-or dropping codepoints, and a surrogate-only set emits a never-matching(?!)instead of the uncompilable[](RE-2, RE-5).The regex splitter correctly handles a character class containing an escaped backslash such as
[\\](RS-2), and passes\Q...\Eliteral spans and(?#...)comments through verbatim rather than expanding any[...]inside them (RS-1, RS-4).The
Is<name>prefix now resolves as a script, general category or binary property before falling back to a block, so\p{IsAlphabetic},\p{IsLatin}and[:IsLowercase:]resolve instead of erroring;Is<Block>names such as\p{IsBasicLatin}still resolve to their block (GAP-ISPREFIX).Digit-bearing block names such as
\p{block=Latin-1 Supplement}now resolve, working around aUnicode.Block.fetch/1bug present in theunicodedependency (PS-7).An empty property value such as
\p{gc=}now returns a clean error instead of silently mis-parsing as a literal character plus a string member.Multi-codepoint string members are emitted before the character class in a set's regex, longest first, so a string such as
i̯in[ij{i̯}]matches as a whole rather than being shadowed by the bareiin the class.A negated set containing string members such as
[^abc{de}]now drops the strings (which can never match a single position under negation) and keeps the code-point ranges, instead of returning an "unsupported" error.
Enhancements
Added the
\UHHHHHHHH(8 hex digit) escape, the single-digit\xHescape, and single-codepoint bracketed\u{...}/\x{...}escapes (including astral codepoints such as\u{1F600}).Added octal
\0oooescapes and\cXcontrol escapes.Multi-codepoint bracketed escapes such as
\u{41 42 43}are now a string member (equivalent to{ABC}).Implemented single-quote quoting: text within
'...'is literal and''is a literal quote (CLDR TR35).\N{NAME}now resolves to its codepoint when built againstunicode ~> 2.0(which provides the character-name table); on earlier versions it returns a clean error.Whitespace immediately after
[or[^is now ignored, consistent with whitespace elsewhere in a set.Hyphens are now accepted and ignored in property names per UAX44-LM3, so
\p{White-Space}and[:Quotation-Mark:]resolve (PS-1).Accept the Java-style
In<Block>prefix, so\p{InBasicLatin}resolves to the block while genuineIn...names such as\p{Inherited}are unaffected (PS-8).The empty set is now written
[]as well as[-], the empty-string member[{}]is supported, and a hyphen at the start or end of a set ([-a],[a-],[a-z-]) is treated as a literal hyphen, matching ICU.The
LC/Cased_Lettergroup general category (Lu | Ll | Lt) now resolves, for both\p{Cased_Letter}and\p{gc=LC}.
Changes
Corrected README examples: the block name
Sundanese(wassudanese), a working\p{General_Category=...}property spelling, the single-dashprintcompatibility definition, and theto_regex_string/1doc example.Removed the unused
:parse_manyparser combinator.Moved the Dialyzer ignore list to the term-format
.dialyzer_ignore.exs.Added a "Conformance" section to the README documenting supported syntax, deliberate tailorings, and current limitations, and a note explaining the POSIX-compatible
[:punct:]definition.Allow
unicode ~> 2.0.Add Credo, test coverage and CI hardening across the Elixir 1.17 to 1.20 / OTP 27 to 29 matrix.
Unicode Set 1.6.1
This is the changelog for Unicode Set 1.6.1 released on March 16th, 2026. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Fix a bug where a set starting with "-" was interpreted as negation.
Unicode Set 1.6.0
This is the changelog for Unicode Set 1.6.0 released on January 19th, 2026. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Fix tests for OTP 28 and Elixir 1.20.
Enhancements
- Updates to Unicode 17.0 data.
Unicode Set 1.5.0
This is the changelog for Unicode Set 1.5.0 released on March 29th, 2025. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Converts all compile-time regex compilation to runtime to be compatible with OTP 28. Performance implications are not yet known.
Unicode Set 1.4.1
This is the changelog for Unicode Set 1.4.1 released on January 1st, 2025. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Work around the Elixir type checker for now.
Unicode Set 1.4.0
This is the changelog for Unicode Set 1.4.0 released on May 26th, 2024. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Fix warnings for Elixir 1.17. Thanks to @alco for the PR.
Unicode Set 1.3.0
This is the changelog for Unicode Set 1.3.0 released on February 18th, 2023. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Correct the code examples in README.md. Thanks to @DianaOlympos for the PR. Closes #9.
Enhancements
- Add
Unicode.Set.compile_pattern!/1to accompanyUnicode.Set.compile_pattern/1.
Unicode Set 1.2.0
This is the changelog for Unicode Set 1.2.0 released on September 15th, 2022. For older changelogs please consult the release tag on GitHub
Enhancements
Update parsing code to ensure compatibility against future deprecations. Thanks to @josevalim.
Fix library name in doc links. Thanks to @zmaril for the PR.
Update dependencies. Thanks to @kianmeng.
Unicode Set 1.1.0
This is the changelog for Unicode Set 1.1.0 released on September 15th, 2021. For older changelogs please consult the release tag on GitHub
Enhancements
ex_unicodeis renamed tounicodein collaboration with @Qqwy and therefore this release updates the dependency name.
Unicode Set 1.0.0
This is the changelog for Unicode Set 1.0.0 released on September 14th, 2021. For older changelogs please consult the release tag on GitHub
Enhancements
- Update to use Unicode 14
Unicode Set 0.13.1
This is the changelog for Unicode Set 0.13.1 released on May 25th, 2021. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Update dependency configuration to mark
ex_docandbencheeas optional. Thanks to @fireproofsocks.
Unicode Set 0.13.0
This is the changelog for Unicode Set 0.13.0 released on April 4th, 2021. For older changelogs please consult the release tag on GitHub
Enhancements
- Adds
Unicode.Set.to_generate_matches/1that returns a tuple whose first element is the AST of a guard clause and the second element is a list of strings. This function is marked private and is implemented to support unicode_transform which uses this information to generate optimised code for matching unicode sets in acaseexpression.
Unicode Set 0.12.0
This is the changelog for Unicode Set 0.12.0 released on February 23rd, 2021. For older changelogs please consult the release tag on GitHub
Enhancements
- Adds support for "isBlockName" Perl and POSIX regex syntax. Used in a regex as
[[:isLatin1]]or\p{isLatin1}or their inverse forms[[:^isLatin1]]and\P{isLatin1}.
Unicode Set 0.11.0
This is the changelog for Unicode Set 0.11.0 released on October 5th, 2020. For older changelogs please consult the release tag on GitHub
Enhancements
- Add recursively defined sets to support compatibility with Posix classes. See
Unicode.Set.Property.
Bug Fixes
Fix various bugs in set operations for
Union,Difference,IntersectionabdComplementCorrectly parse and interpret set complements such as
[^[:^Sc:]]and more complex sets such as[^[[:Sc:]-[:^Lu:]]]
Unicode Set 0.10.0
This is the changelog for Unicode Set 0.10.0 released on October 2nd, 2020. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Fix list composition in
Unicode.Set.to_uft8_char/1
Unicode Set 0.9.0
This is the changelog for Unicode Set 0.9.0 released on October 2nd, 2020. For older changelogs please consult the release tag on GitHub
Enhancements
- Support
nimble_parsecversion 1.x. Thanks to @josevalim for the PR.
Unicode Set 0.8.0
This is the changelog for Unicode Set 0.8.0 released on July 12th, 2020. For older changelogs please consult the release tag on GitHub
Enhancements
Rewrite
Unicode.Regexmodule to better extract character classes, process unicode sets and build Elixir regexs. Now also supports string ranges.Supports the property
East Asian Width(short nameea) which is required for implementing the Unicode segmentation algorithms. Also bumps the minimum requirement for ex_unicode version 1.8.
Unicode Set 0.7.0
This is the changelog for Unicode Set v.07.0 released on May 18th, 2020. For older changelogs please consult the release tag on GitHub
Enhancements
Add
Unicode.Set.character_class/1which returns a string compatible withRegex.compile/2. This supports the idea of expanded Unicode Sets being used in standard Elixir/erlang regular expressions and will underpin implementation of Unicode Transforms in the packageunicode_transformAdd
Unicode.Regex.compile/2to pre-process a regex to expand Unicode Sets and the compile it withRegex.compile/2.Unicode.Regex.compile!/2is also added.
Bug Fixes
- Fixes a bug whereby a Unicode Set intersection would fail with a character class that starts at the same codepoint as the Unicode set.
Unicode Set 0.6.0
This is the changelog for Unicode Set v.06.0 released on May 13th, 2020. For older changelogs please consult the release tag on GitHub
Enhancements
Unicode sets are now a
%Unicode.Set{}structAdd
Unicode.Set.Sigilimplementingsigil_uAdd support for
String.CharsandInspectprotocols
Bug Fixes
Fixes parsing sets to ignore non-encoded whitespace
Fixes intersection and difference set operations for sets that include string ranges like
{abc}
Unicode Set 0.5.1
This is the changelog for Unicode Set v.05.1 released on March 14th, 2020. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Compacts tuple-ranges in order to minimize the number of generated clauses in guards. Requires at least
ex_unicodeversion 1.5.0.
Unicode Set 0.5.0
This is the changelog for Unicode Set v.05.0 released on March 11th, 2020. For older changelogs please consult the release tag on GitHub
Enhancements
- Updates
ex_unicodeto version1.4.0which includes support for Unicode version 13.0 as well as support for several derived categories related to quote marks.
Unicode Set 0.4.2
This is the changelog for Unicode Set v.04.2 released on February 25th, 2020. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Allow
\n,\tand\r,\sas part of character classes
Unicode Set 0.4.1
This is the changelog for Unicode Set v.04.1 released on January 8th, 2020. For older changelogs please consult the release tag on GitHub
Bug Fixes
- Fix
Unicode.Set.Operation.difference/2when one list is wholly contained within another
Unicode Set 0.4.0
This is the changelog for Unicode Set v.04.0 released on November 27th, 2019. For older changelogs please consult the release tag on GitHub
Enhancements
- Bump to ex_unicode to version 1.3.0 to support an expanded set of properties resolved by
unicode_set.
Unicode Set 0.3.0
This is the changelog for Unicode Set v.03.0 released on November 26th, 2019. For older changelogs please consult the release tag on GitHub
Enhancements
Support string ranges expressed as
{abc}or{abc}-{def}Note that the supported proporties in this release are
script,block,categoryandcombining class.
Unicode Set 0.2.0
This is the changelog for Unicode Set v.02.0 released on November 24th, 2019. For older changelogs please consult the release tag on GitHub
Enhancements
Add
Unicode.Set.compile_pattern/1andUnicode.Set.pattern/1to generate patterns and compiled patterns compatible withString.split/3andString.replace/3.Add
Unicode.Set.utf8_char/1that generates a list of codepoint ranges compatible with nimble_parsec combinators.
Set the README for example usage.
Unicode Set 0.1.0
This is the changelog for Unicode Set v.01.0 released on November 23rd, 2019. For older changelogs please consult the release tag on GitHub
Initial release.