|
|
|
|
|
by egeozcan
1434 days 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. |
|
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).