ID: 34963
User updated by: brausepaule at gmx dot de
Reported By: brausepaule at gmx dot de
-Status: Feedback
+Status: Open
Bug Type: Unknown/Other Function
Operating System: Linux Suse 9.3
PHP Version: 5.0.5
New Comment:
setlang means setlocale
sorry
Previous Comments:
------------------------------------------------------------------------
[2005-10-23 20:36:06] [EMAIL PROTECTED]
What is this "Setlang" you're talking about?
------------------------------------------------------------------------
[2005-10-23 20:13:08] brausepaule at gmx dot de
Description:
------------
Under Linux 9.3 the function strcoll ignore the _
Under Windows it's work fine.
Reproduce code:
---------------
$ar = array('auto', 'beton', 'ätsch', 'ölig', 'test','file 4','file
6','file 7','1 file 2','2 file 1','3 file 3','_file 5');
setlocale (LC_ALL, '[EMAIL PROTECTED]', 'de_DE', 'de', 'ge', 'german');
usort($ar,'strcoll');
while (list ($key, $value) = each ($ar))
echo "$key: $value\n";
Expected result:
----------------
Under Windows (it's correct)
0: _file 5
1: 1 file 2
2: 2 file 1
3: 3 file 3
4: ätsch
5: auto
6: beton
7: file 4
8: file 6
9: file 7
10: ölig
11: test
Actual result:
--------------
Under Linux:
0: 1 file 2
1: 2 file 1
2: 3 file 3
3: ätsch
4: auto
5: beton
6: file 4
7: _file 5
8: file 6
9: file 7
10: ölig
11: test
the setlang works! Without setlang with strcmp it seems like:
0: _file 5
1: 1 file 2
2: 2 file 1
3: 3 file 3
4: auto
5: beton
6: file 4
7: file 6
8: file 7
9: test
10: ätsch
11: ölig
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34963&edit=1