1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:08:12 +00:00
serenity/Userland/Libraries/LibUnicode
Timothy Flynn 556374a904 LibUnicode: Substitute Unicode locale aliases during canonicalization
Unicode TR35 defines how locale subtag aliases should be emplaced when
converting a locale to canonical form. For most subtags, it is a simple
substitution. Language subtags depend on context; for example, the
language "sh" should become "sr-Latn", but if the original locale has a
script subtag already ("sh-Cyrl"), then only the language subtag of the
alias should be taken ("sr-Latn").

To facilitate this, we now make two passes when canonicalizing a locale.
In the first pass, we convert the LocaleID structure to canonical syntax
(where the conversions all happen in-place). In the second pass, we form
the canonical string based on the canonical syntax.
2021-09-01 14:14:47 +01:00
..
CharacterTypes.cpp LibUnicode: Download and parse DerivedNormalizationProps UCD file 2021-08-11 13:11:01 +02:00
CharacterTypes.h LibUnicode: Parse UCD ScriptExtensions.txt and generate property 2021-08-04 13:50:32 +01:00
CMakeLists.txt Meta+LibUnicode: Move unicode_data helper to Meta/CMake 2021-08-28 08:44:17 +01:00
Forward.h LibUnicode: Generate locale subtag data as multiple smaller tables 2021-08-27 12:32:24 +01:00
Locale.cpp LibUnicode: Substitute Unicode locale aliases during canonicalization 2021-09-01 14:14:47 +01:00
Locale.h LibUnicode: Generate Unicode locale alias data 2021-09-01 14:14:47 +01:00