4 ms·
This part of the article is just so English-specific it hurts. It's assuming that usernames will all be ASCII, basically. There is nothing trivial about eithe
by bzbarsky 9y ago
This part of the article is just so English-specific it hurts. It's assuming that usernames will all be ASCII, basically.
There is nothing trivial about either "lowercasing" or "case-insensitive compares" in general Unicode strings...
- eCa 9y agoIn Perl5 there’s fc() which handles that. https://perldoc.perl.org/functions/fc.html https://perldoc.perl.org/functions/fc.html
- bzbarsky 9y ago"handles" in what sense? It needs to give different answers for the same letter depending on whether the text is English or Turkish, for example, so I don't see how it can "handle" it in general. Reading the documentation you link to, the answer in the fine print is that fc() gives you incorrect results for Turkish text.