diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-09-05 03:28:00 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-09-05 03:28:00 -0400 |
commit | 4674809bdf7a46041ac0152eea0a6363ceeca548 (patch) | |
tree | 4e8460ef71d49a36c912bed355bc4e7ed7b0bf41 /src/ctype/towctrans.c | |
parent | fff546930347d99729f1c0a9d911e7f24a094531 (diff) | |
download | musl-4674809bdf7a46041ac0152eea0a6363ceeca548.tar.gz musl-4674809bdf7a46041ac0152eea0a6363ceeca548.tar.bz2 musl-4674809bdf7a46041ac0152eea0a6363ceeca548.tar.xz musl-4674809bdf7a46041ac0152eea0a6363ceeca548.zip |
fix case mapping for U+00DF (ß)
U+00DF ('ß') has had an uppercase form (U+1E9E) available since
Unicode 5.1, but Unicode lacks the case mappings for it due to
stability policy. when I added support for the new character in commit
1a63a9fc30e7a1f1239e3cedcb5041e5ec1c5351, I omitted the mapping in the
lowercase-to-uppercase direction. this choice was not based on any
actual information, only assumptions.
this commit adds bidirectional case mappings between U+00DF and
U+1E9E, and removes the special-case hack that allowed U+00DF to be
identified as lowecase despite lacking a mapping. aside from strong
evidence that this is the "right" behavior for real-world usage of
these characters, several factors informed this decision:
- the other "potentially correct" mapping, to "SS", is not
representable in the C case-mapping system anyway.
- leaving one letter in lowercase form when transforming a string to
uppercase is obviously wrong.
- having a character which is nominally lowercase but which is fixed
under case mapping violates reasonable invariants.
Diffstat (limited to 'src/ctype/towctrans.c')
-rw-r--r-- | src/ctype/towctrans.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/ctype/towctrans.c b/src/ctype/towctrans.c index 5e0889b1..6af61875 100644 --- a/src/ctype/towctrans.c +++ b/src/ctype/towctrans.c @@ -151,7 +151,6 @@ static const unsigned short pairs[][2] = { { 0x03f7, 0x03f8 }, { 0x03fa, 0x03fb }, { 0x1e60, 0x1e9b }, - { 0xdf, 0xdf }, { 0x1e9e, 0xdf }, { 0x1f59, 0x1f51 }, |