about summary refs log tree commit diff
path: root/NEWS
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@redhat.com>2021-07-29 22:45:39 -0400
committerCarlos O'Donell <carlos@redhat.com>2021-09-06 11:06:45 -0400
commitf5117c6504888fab5423282a4607c552b90fd3f9 (patch)
tree2961802e4e55a5669f9b224923955871524a33fd /NEWS
parent1d9f99ce1b3788d1897cb53a76d57e973111b8fe (diff)
downloadglibc-f5117c6504888fab5423282a4607c552b90fd3f9.tar.gz
glibc-f5117c6504888fab5423282a4607c552b90fd3f9.tar.xz
glibc-f5117c6504888fab5423282a4607c552b90fd3f9.zip
Add 'codepoint_collation' support for LC_COLLATE.
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>
Diffstat (limited to 'NEWS')
0 files changed, 0 insertions, 0 deletions