3 ms·
There is no such breakage at all, the assumption that casing and collation can happen without locale-specific information is invalid, Unicode isn't designed to
by samatman 5y ago
There is no such breakage at all, the assumption that casing and collation can happen without locale-specific information is invalid, Unicode isn't designed to prevent this and we'd hate it if it was.
This may not be a solved problem in a given programming language's standard library, and/or one might see a bug such as the one GP was reporting, but neither of these conditions is inevitable, here's how you do it in Swift:
"i".uppercased(with: Locale(identifier: "tr_TR")) // returns "İ"
"i".uppercased(with: Locale(identifier: "en_US")) // returns "I"
Same deal with "ij".uppercased and "nl_NL" locale.
It's not a bug that Unicode just threw its hands up and said that complex string operations are locale-specific. The more you learn about the various scripts it represents, the more you will appreciate that there is no other choice.
- schiffern 5y agoI don't disagree, actually. IMO "the brokenness of more complex text transformations" is fundamental, not a 'bug.' Hopefully this makes what I meant a bit more clear.
- nanis 5y agoThat is baloney ... The fact is Unicode could have provided extra codepoints so that at the least the possibility of correctly processing a mainly French document that includes passages in Turkish at least existed. The current state of affairs categorically rules that out it contrary to the situation with any other language.