News for hackers. Stuff that matters.
Re:tolower() in bulk at speed by asveikau on Monday June 27, 2022 @06:55PM (#31902001)
Lower case is locale-sensitive, however. For example, tolower('I') in Turkish should be 'ı'.

And within unicode, doing it in a "dumb ascii" way probably needs some normalization of diacritics. Eg. 'é' should be U+0065 U+0301 ("e\xcc\x81"), not U+00E9 ("\xc3\x89").

Not sure how punycode handles this, I did once look deeply into it but that was years ago.

Re:tolower() in bulk at speed by lifthrasiir on Monday June 27, 2022 @07:13PM (#31902145)
Punycode normalizes the case and other Unicode stuffs with the PRECIS Framework [1] before the label ever gets encoded to an ASCII-Compatible Encoding---those get prefixed with `xn--`. The root zone and top-level domains have an additional set of script-specific restrictions as well (RZ-LGR [2] in particular).

[1] https://datatracker.ietf.org/doc/html/rfc7564

[2] https://www.icann.org/resources/pages/root-zone-lgr-2015-06-...