From 4674809bdf7a46041ac0152eea0a6363ceeca548 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 5 Sep 2014 03:28:00 -0400 Subject: fix case mapping for U+00DF (ß) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/ctype/iswlower.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ctype/iswlower.c') diff --git a/src/ctype/iswlower.c b/src/ctype/iswlower.c index c754fb95..79df44a3 100644 --- a/src/ctype/iswlower.c +++ b/src/ctype/iswlower.c @@ -3,7 +3,7 @@ int iswlower(wint_t wc) { - return towupper(wc) != wc || wc == 0xdf; + return towupper(wc) != wc; } int __iswlower_l(wint_t c, locale_t l) -- cgit 1.4.1