Releases: elixir-cldr/cldr_collation
Cldr Collation version 1.1.0
Bug Fixes
Cldr.Collation.Insensitive.compare/2now accepts any term, falling back to Erlang term order when either argument is non-binary so it can be used safely as a comparator withEnum.sort_by/3and multi-key sort functions.Cldr.Collation.compare/3andsort_key/2now raise a clearArgumentError(instead of crashing in internal lookup) when given non-binary input. Thanks to @tjchambers for the report. Closes #20.
Cldr Collation version 1.0.0
This is a major release that replaces the previous NIF-only implementation with a
complete pure-Elixir implementation of the Unicode Collation Algorithm (UCA) as
extended by CLDR. The optional NIF backend is retained for high-performance use cases.
Breaking changes
-
The main module is now
Cldr.Collation(wasCldr.Collator). -
Cldr.Collation.compare/3returns:lt | :eq | :gt(was-1 | 0 | 1). -
Module-based comparators are now
Cldr.Collation.SensitiveandCldr.Collation.Insensitive(wereCldr.Collator.SensitiveandCldr.Collator.Insensitive).
Enhancements
-
Implement the full Unicode Collation Algorithm in pure Elixir, removing the hard requirement on ICU system libraries.
-
Support all BCP47 -u- extension collation keys: strength, alternate, backwards, normalization, case_level, case_first, numeric, reorder, and max_variable.
-
Add locale-specific tailoring for Danish, German (phonebook), Spanish, Swedish, Finnish, Norwegian, Polish, Croatian, and Turkish.
-
Add CJK radical-stroke ordering via
Cldr.Collation.Han. -
Add fast Latin lookup path for codepoints U+0000..U+017F.
-
Add script reordering support (
reorderoption). -
Add convenience options:
ignore_accents,ignore_case,ignore_punctuation, andcasingfor compatibility with the previousex_cldr_collationAPI. -
Add
Cldr.Collation.sort/2for sorting string lists. -
Add
Cldr.Collation.sort_key/2for generating binary sort keys. -
Support
Cldr.LanguageTagstructs as the:localeoption whenex_cldris available.
Cldr Collation version 0.7.5
Bug fixes
-
Remove deprecated linker option
-undefined suppressin favour of-undefined dynamic_lookupon MacOS. -
Update README to illustrate how an installed
libicuin the search path will take precendence over user the nativeicucorelibrary.
Cldr Collation version 0.7.4
Bug fixes
- Fix Makefile for Darwin (MacOS) when running in devenv. Thanks to @serpent213 for the issue. Closes #14.
Cldr Collation version 0.7.3
Bug fixes
- Fix compiler warnings for Elixir 1.17.
Cldr Collation version 0.7.2
Cldr Collation version 0.7.1
Bug fixes
- Add binary guards to
Cldr.Collation.compare/3.
Cldr Collation version 0.7.0
Bug fixes
-
Fix the .so path for the NIF at load time, not compile time. Thanks to @sergiorjsd for the report. Closes #3.
-
Fix buidling on ARM-based Mac models
Cldr Collation version 0.6.0
Bug fixes
- Load the nif from a path relative to
:code.priv_dir/1.
Cldr Collation version 0.5.0
Bug fixes
- Correctly reference the
ucol.sofile when loading at startup
Enhancements
-
Adds
Cldr.Collator.sort/2 -
Adds documentation for
Cldr.Collator.compare/3