Unicode collation algorithm
The Unicode collation algorithm (UCA) is an algorithm defined in Unicode Technical Report #10, which defines a customizable method to compare two strings. These comparisons can then be used to collate or sort text in any writing system and language that can be represented with Unicode. While the UCA is customizable for any given application, it is important to note that it is multilingual in that it provides a default collation algorithm which can be used to consistently sort text from any number of languages.
When used with the default Unicode collation element table (DUCET), this collation method is similar to the European ordering rules for strings in most European languages. In particular, for strings in the Latin alphabet, the ordering is the same as normal sorting order in English and similar languages, since it first looks only at letters stripped of any modifications or diacritical marks.
Note - For a detailed overview of this complex method, full specification can be found at Unicode Technical Standard #10.
In addition to providing a default sorting order, UTS #10 also specifies how to tailor the sorting behaviour to be appropriate for a given locale.
An important open source implementation of UCA is included with the International Components for Unicode, which also supports tailoring. You can see the effects of tailoring and a large number of language specific tailorings in the on-line ICU Locale Explorer.
See also
External links and references
- Unicode Collation Algorithm: Unicode Technical Standard #10
- International Components for Unicode (ICU)
- Mimer SQL Unicode Collation Charts
- MySQL UCA-based Unicode Collation Charts
Tools
- ICU Locale Explorer An online demonstration of the Unicode Collation Algorithm using International Components for Unicode
- msort A sort program that provides an unusual level of flexibility in defining collations and extracting keys.