summary refs log tree commit diff
path: root/localedata/Makefile
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@redhat.com>2021-09-01 15:19:19 -0400
committerCarlos O'Donell <carlos@redhat.com>2021-09-06 11:30:28 -0400
commit466f2be6c08070e9113ae2fdc7acd5d8828cba50 (patch)
treec4fb7c10d98994298dcd451df71f1be790b575e9 /localedata/Makefile
parentf5117c6504888fab5423282a4607c552b90fd3f9 (diff)
downloadglibc-466f2be6c08070e9113ae2fdc7acd5d8828cba50.tar.gz
glibc-466f2be6c08070e9113ae2fdc7acd5d8828cba50.tar.xz
glibc-466f2be6c08070e9113ae2fdc7acd5d8828cba50.zip
Add generic C.UTF-8 locale (Bug 17318)
We add a new C.UTF-8 locale. This locale is not builtin to glibc, but
is provided as a distinct locale. The locale provides full support for
UTF-8 and this includes full code point sorting via STRCMP-based
collation (strcmp or wcscmp).

The collation uses a new keyword 'codepoint_collation' which drops all
collation rules and generates an empty zero rules collation to enable
STRCMP usage in collation. This ensures that we get full code point
sorting for C.UTF-8 with a minimal 1406 bytes of overhead (LC_COLLATE
structure information and ASCII collating tables).

The new locale is added to SUPPORTED. Minimal test data for specific
code points (minus those not supported by collate-test) is provided in
C.UTF-8.in, and this verifies code point sorting is working reasonably
across the range. The locale was tested manually with the full set of
code points without failure.

The locale is harmonized with locales already shipping in various
downstream distributions. A new tst-iconv9 test is added which verifies
the C.UTF-8 locale is generally usable.

Testing for fnmatch, regexec, and recomp is provided by extending
bug-regex1, bugregex19, bug-regex4, bug-regex6, transbug, tst-fnmatch,
tst-regcomp-truncated, and tst-regex to use C.UTF-8.

Tested on x86_64 or i686 without regression.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'localedata/Makefile')
-rw-r--r--localedata/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/localedata/Makefile b/localedata/Makefile
index f585e0dd41..66a269641b 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -47,6 +47,7 @@ test-input := \
 	bg_BG.UTF-8 \
 	br_FR.UTF-8 \
 	bs_BA.UTF-8 \
+	C.UTF-8 \
 	ckb_IQ.UTF-8 \
 	cmn_TW.UTF-8 \
 	crh_UA.UTF-8 \
@@ -206,6 +207,7 @@ LOCALES := \
 	bg_BG.UTF-8 \
 	br_FR.UTF-8 \
 	bs_BA.UTF-8 \
+	C.UTF-8 \
 	ckb_IQ.UTF-8 \
 	cmn_TW.UTF-8 \
 	crh_UA.UTF-8 \