[development] Reverse iconv encoding for sorting of international arrays
Gerhard Killesreiter
gerhard at killesreiter.de
Thu Jan 11 21:45:07 UTC 2007
Gabor Hojtsy wrote:
> 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.
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.
Cheers,
Gerhard
More information about the development
mailing list