[development] Reverse iconv encoding for sorting of international arrays
Gabor Hojtsy
gabor at hojtsy.hu
Thu Jan 11 21:50:59 UTC 2007
On Thu, 11 Jan 2007, Gerhard Killesreiter wrote:
>> Indeed, PHP supports locale aware sorting. Unfortunately all is only nice
>> in PHP 6 (see http://www.php.net/i18n_loc_set_default for a nice
>> example). The question is if sort() supports utf8 sorting by the surrent
>> system locale properly (it sorts by ASCII code by default). I did not try
>> this before.
>
> Neither did I, but I know that you can set the locale using setlocale just
> fine. It is unclear to me how i18n_loc_set_default is different from this.
PHP 6 is all based on utf8, and this is implemented with the IBM ICU
library on the backend. That function sets the locale used in the ICU
operations, not the system locale.
Gabor
More information about the development
mailing list