-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
String.toUpper only handles a-z. This breaks Swedish, for example. åsa gets uppercased to åSA instead of ÅSA, assuming the å character is a single code point.
Unfortunately, which lowercase characters correspond to what uppercase characters is locale-dependent, so implementing a non-ascii version is tricky. https://stackoverflow.com/questions/12537377/in-haskell-how-can-i-uppercase-a-unicode-character-with-respect-to-current-local
I'd suggest dropping these functions and using css (text-transform: uppercase) to uppercase/lowercase written strings, hoping that the browser locale is correct most of the time. For case-insensitive string comparisons, there's unicode normalization algorithms which can be used.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels