From: brausepaule at gmx dot de
Operating system: Linux Suse 9.3
PHP version: 5.0.5
PHP Bug Type: Unknown/Other Function
Bug description: strcoll ignore "_" under Linux
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 bug report at http://bugs.php.net/?id=34963&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34963&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=34963&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=34963&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34963&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34963&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34963&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34963&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34963&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34963&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34963&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=34963&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=34963&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34963&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34963&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34963&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34963&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34963&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34963&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34963&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34963&r=mysqlcfg