I have words in Cyrillic-1251 (Ukrainian-Russian) and I want to sort them A-Z but it's only partially working right now. I guess PHP is converting the unicode characters into single-byte characters ??
I do not know whether ksort() is multibyte aware or not. Since the PHP online manual does not say it it, the function probably is not.
If ksort() is not working for you, my one recommendation is to use uksort() with a multibye-safe or binary-safe comparison function. The online manual states that strcmp() is binary-safe.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.