[development] Reverse iconv encoding for sorting of international arrays

Gabor Hojtsy gabor at hojtsy.hu
Thu Jan 11 21:18:36 UTC 2007


On Thu, 11 Jan 2007, Gerhard Killesreiter wrote:
>> Are there any libraries that do this for PHP already where I can look?
>
> PHP does support sorting by locale since PHP 4.4 and 5, see php.net/sort
> SORT_LOCALE_STRING

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.

Gabor


More information about the development mailing list