
Dec. 21, 2022
1:23 p.m.
On Wed, 21 Dec 2022 at 17:20, David Mertz, Ph.D. <david.mertz@gmail.com> wrote:
I'm on my tablet, so cannot test at the moment. But is `str.upper()` REALLY wrong about the Turkish dotless I (and dotted capital I) currently?!
That feels like a BPO needed if true.
It's wrong about the ASCII i and I, which upper and lower case to each other. There's no way for str.upper() to be told what language it's working with, so it goes with a default that's valid for every language except Turkish and its friends. This also means that lowercasing "İ" will give "i" which uppercases to "I", so it doesn't round-trip. There is no solution other than a language-aware case transformation. ChrisA