[php-src] Issue #8096: mb_convert_case($str, MB_CASE_TITLE, "UTF-8"); doesn't convert the Greek last letter to ς but to σ

From: Date: Sat, 09 Apr 2022 10:19:18 +0000
Subject: [php-src] Issue #8096: mb_convert_case($str, MB_CASE_TITLE, "UTF-8"); doesn't convert the Greek last letter to ς but to σ
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-240812@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8096 Comment Author: alexdowad Hmm, so according to the Unicode 'special casing' table, the only languages which have unique casing requirements are Lithuanian, Turkish, and Azeri. For U+03A3, there is no language condition mentioned... the condition for special casing is just Final_Sigma. I wonder how many Lithuanian, Turkish, and Azeri PHP users there are? PHP is a popular programming language, so there are almost certainly a few. Because the "final sigma" rule is not indicated as being language-dependent in the special casing table, should we make it apply regardless of language or locale? Also, it looks like the "final sigma" rule only impacts the lowercase conversion code. (U+03A3 maps to itself for title and upper case; it's only lowercase where it changes.) We are currently moving towards doing all operations "a buffer at a time" rather than "a codepoint at a time". Working in this way saves an enormous amount of overhead and makes everything several times faster. After we convert the upper/lower casing code to follow this pattern, I think lookahead would not be such a big problem. We just need to be careful about the case where sigma appears *as the last codepoint in a buffer*. Sounds good?

« previous php.bugs (#240812) next »