11 Jan
2007
11 Jan
'07
10:50 p.m.
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