In common usage, when mapping to upper case, the lower-case ß gets mapped to double S (e.g. "Straße" -> "STRASSE"), which I guess is another fun edge case for Unicode implementations to cover.
toLower(toUpper(a)) != a
len(toLower(toUpper(a))) != a
If your code assumes any of this, it already was brokenBut now, if you don’t have your locale set to Turkish, then you have
toUpper(“ı”) = “I”, toLower(“I”) = “i”
so the character does not round trip.
toLower(toUpper(a)) == toLower(a)
toLower(toLower(a)) == toLower(a)
should work though, with German even that is not guaranteed unless you really spend a lot of time figuring out when to convert SS to ß. I suppose making toLower convert ß to ss would avoid that particular problem, but I'm not sure the Germans would agree with that one (which is why I said no nice solution exists).At the very least it looks like you need a different toLower for style purposes than one for string comparison, unless someone can come up with a string where replacing ß with ss changes the meaning (or some equivalent to this), in which case there's no hope.
But that function would not be toLower(), it would be toSwiss()
> unless someone can come up with a string where replacing ß with ss changes the meaning
"Er trinkt in Maßen" - He drinks with moderation.
"Er trinkt in Massen" - He drinks huge amounts.
The pronounciation is different, too, a vowel before "ß" is long, before "ss" short.
See Rule 25 E3:
> Bei Schreibung mit Großbuchstaben schreibt man SS. Daneben ist auch die Verwendung des Großbuchstabens ẞ möglich. Beispiel: Straße – STRASSE – STRAẞE.
http://www.rechtschreibrat.com/DOX/rfdr_Regeln_2016_redigier...
All other extant uses were designers and font makers writing blog,posts how much they want that character and discussing how it should look like.
Besides that it never existed. Unicode made a mistake. It was just that some people feel it should exist, in order to „complete“ the set of characters.
The most compelling argument is that this character has been used on German passports since at least 1988 (I don't know whether they started this even earlier). On passports, names are written in capital letters by international standard. That character is necessary to accurately represent people's names.
Gave me a tense moment in China, when a border agent questioned the difference between the name on my ticket and the name in the passport.
Of course, to Germans both forms are interchangeable, but I'd compare a Chinese letter sign by sign, too.
He finally accepted it when I showed him that the machine-readable line was identically spelled.