4 ms·
PHP RFC: Locale-independent case conversion
- rurban 5y agoPHP is moving away from Unicode. Apparently ASCII in their stdlib is enough. This happens when you cannot add optional params to your stdlib declaring your locale.
- duskwuff 5y agoNo, PHP is moving away from functions which have never worked properly on Unicode input at all: > But even if the user did want natural language case conversion, they would be unlikely to achieve success with strtolower(). This is because it processes the string one byte at a time, feeding each byte to the C library's tolower(). If the input is UTF-8, by far the most popular modern choice, strtolower() will mangle the string, typically producing invalid UTF-8 as output. There are other functions which actually work for Unicode-aware case conversion, like mb_strtolower() or mb_convert_case().