mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-15 01:21:06 +00:00
f5117c6504
Support a new directive 'codepoint_collation' in the LC_COLLATE section of a locale source file. This new directive causes all collation rules to be dropped and instead STRCMP (strcmp or wcscmp) is used for collation of the input character set. This is required to allow for a C.UTF-8 that contains zero collation rules (minimal size) and sorts using code point sorting. To date the only implementation of a locale with zero collation rules is the C/POSIX locale. The C/POSIX locale provides identity tables for _NL_COLLATE_COLLSEQMB and _NL_COLLATE_COLLSEQWC that map to ASCII even though it has zero rules. This has lead to existing fnmatch, regexec, and regcomp implementations that require these tables. It is not correct to use these tables when nrules == 0, but the conservative fix is to provide these tables when nrules == 0. This assures that existing static applications using a new C.UTF-8 locale with 'codepoint_collation' at least have functional range expressions with ASCII e.g. [0-9] or [a-z]. Such static applications would not have the fixes to fnmatch, regexec and regcomp that avoid the use of the tables when nrules == 0. Future fixes to fnmatch, regexec, and regcomp would allow range expressions to use the full set of code points for such ranges. Tested on x86_64 and i686 without regression. Reviewed-by: Florian Weimer <fweimer@redhat.com> |
||
---|---|---|
.. | ||
3level.h | ||
charmap-dir.c | ||
charmap-dir.h | ||
charmap-kw.gperf | ||
charmap-kw.h | ||
charmap.c | ||
charmap.h | ||
config.h | ||
ld-address.c | ||
ld-collate.c | ||
ld-ctype.c | ||
ld-identification.c | ||
ld-measurement.c | ||
ld-messages.c | ||
ld-monetary.c | ||
ld-name.c | ||
ld-numeric.c | ||
ld-paper.c | ||
ld-telephone.c | ||
ld-time.c | ||
linereader.c | ||
linereader.h | ||
locale-spec.c | ||
locale.c | ||
localedef.c | ||
localedef.h | ||
locarchive.c | ||
locfile-kw.gperf | ||
locfile-kw.h | ||
locfile-token.h | ||
locfile.c | ||
locfile.h | ||
record-status.c | ||
record-status.h | ||
repertoire.c | ||
repertoire.h | ||
simple-hash.c | ||
simple-hash.h | ||
xasprintf.c | ||
xmalloc.c | ||
xstrdup.c |