#36718 [Fbk->Opn]: sort with SORT_LOCALE_STRING
ID: 36718
User updated by: mpmp at zoznam dot sk
Reported By: mpmp at zoznam dot sk
-Status: Feedback
+Status: Open
Bug Type: Arrays related
Operating System: Linux
PHP Version: 5.1.2
New Comment:
sent to your email address.
Previous Comments:
------------------------------------------------------------------------
[2006-03-13 15:25:14] derick@php.net
Please send me the example script in a tar.gz archive and I'll have a
look.
------------------------------------------------------------------------
[2006-03-13 15:20:13] mpmp at zoznam dot sk
Description:
------------
I am using setlocale(LC_ALL, 'slovak');
Accented characters are not properly sorted on Linux. On windows this
code runs well. Locales are installed, and other locales related
functions run well.
Reproduce code:
---------------
$pole = array (
'čaj',
'ľad',
'ťahaj',
'ábel',
'la',
'íver',
'iť',
'éger',
'ôler',
'ňano',
'äj',
'Ľadový');
setlocale (LC_ALL, "slovak");
sort ($pole, SORT_LOCALE_STRING);
Expected result:
----------------
Array (
[0] => ábel
[1] => äj
[2] => čaj
[3] => éger
[4] => íver
[5] => ľad
[6] => Ľadový
[7] => ňano
[8] => ôler
[9] => la
[10] => ťahaj
[11] => iť )
Actual result:
--------------
Array (
[0] => ábel
[1] => ťahaj
[2] => äj
[3] => čaj
[4] => éger
[5] => iť
[6] => íver
[7] => la
[8] => ňano
[9] => ôler
[10] => Ľadový
[11] => ľad )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36718&edit=1
Thread (4 messages)