4 ms·
> German ß capitalizes to SS, and .ToUpper().ToLower() should give you either 'ss' or 'ß' depending on what it was before As long as there is no unicode SS cha
by egeozcan 4y ago
> German ß capitalizes to SS, and .ToUpper().ToLower() should give you either 'ss' or 'ß' depending on what it was before
As long as there is no unicode SS character, we are into the "what color are your bits" problem or tolower needs to be language and word aware.
In .NET the uppercase and lowercase functions are culture aware (with defaults to system settings, which breaks more software than you might think) but not word aware AFAIK.
- bee_rider 4y ago> As long as there is no unicode SS character, we are into the "what color are your bits" problem or tolower needs to be language and word aware. It turns out there is such a unicode character -- ẞ/ß -- although based on other comments here it looks like it was added fairly recently. Upper/Lower case stuff just seems to be at an annoying intersection where it has cultural and also programming significance. Or at least, people will use toUpper when they really want some case-insensitive sortable version of the string. (based on some googling, probably localeCompare is the way to go in javascript at least).
- 3836293648 4y agoI hate the locale nonsense. The decimal point is `.` and not `,`. The rest of this stupid country is wrong