On 23/06/2019 16:29, Ben Ramsey wrote:
According to Google, "İyi akşamlar” is the Turkish phrase for “Good evening” (Turkish speakers, please correct me, if this wrong). However, using the existing mb_* functions, I can’t get mb_stripos() to return 0 when trying to see if the string “İYI AKŞAMLAR” begins with “i̇yi.”
Probably mb_string not using the right case-folding routines; as mentioned in another thread, ext/mbstring wasn't written for Unicode, but for older multibyte encodings, particularly those used for Japanese text. grapheme_stripos (from ext/intl) apparently gets it right as of PHP 7.3: https://3v4l.org/0431j
A much simpler example, though, is using just the second word of that string: the accented "s" confuses plain stripos but not mb_stripos.
Regards, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php