From: mgdm Operating system: Mac OS X 10.6 PHP version: 5.4SVN-2012-01-30 (SVN) Package: Arrays related Bug Type: Bug Bug description:Testing asort with SORT_LOCALE_STRING fails on Mac OS X 10.6
Description: ------------ The test ext/standard/tests/array/locale_sort.phpt fails. "Ãle-du-Prince-Ãdouard" is sorted to the end of the array, instead of the expected 3rd position. Test script: --------------- <?php setlocale(LC_ALL, 'fr_FR', 'fr_FR.ISO8859-1'); $table = array("AB" => "Alberta", "BC" => "Colombie-Britannique", "MB" => "Manitoba", "NB" => "Nouveau-Brunswick", "NL" => "Terre-Neuve-et-Labrador", "NS" => "Nouvelle-Ãcosse", "ON" => "Ontario", "PE" => "Ãle-du-Prince-Ãdouard", "QC" => "Québec", "SK" => "Saskatchewan", "NT" => "Territoires du Nord-Ouest", "NU" => "Nunavut", "YT" => "Territoire du Yukon"); asort($table, SORT_LOCALE_STRING); var_dump($table); Expected result: ---------------- array(13) { ["AB"]=> string(7) "Alberta" ["BC"]=> string(20) "Colombie-Britannique" ["PE"]=> string(21) "Ãle-du-Prince-Ãdouard" ["MB"]=> string(8) "Manitoba" ["NB"]=> string(17) "Nouveau-Brunswick" ["NS"]=> string(15) "Nouvelle-Ãcosse" ["NU"]=> string(7) "Nunavut" ["ON"]=> string(7) "Ontario" ["QC"]=> string(6) "Québec" ["SK"]=> string(12) "Saskatchewan" ["NL"]=> string(23) "Terre-Neuve-et-Labrador" ["YT"]=> string(19) "Territoire du Yukon" ["NT"]=> string(25) "Territoires du Nord-Ouest" Actual result: -------------- array(13) { ["AB"]=> string(7) "Alberta" ["BC"]=> string(20) "Colombie-Britannique" ["MB"]=> string(8) "Manitoba" ["NB"]=> string(17) "Nouveau-Brunswick" ["NS"]=> string(15) "Nouvelle-Ãcosse" ["NU"]=> string(7) "Nunavut" ["ON"]=> string(7) "Ontario" ["QC"]=> string(6) "Québec" ["SK"]=> string(12) "Saskatchewan" ["NL"]=> string(23) "Terre-Neuve-et-Labrador" ["YT"]=> string(19) "Territoire du Yukon" ["NT"]=> string(25) "Territoires du Nord-Ouest" ["PE"]=> string(21) "Ãle-du-Prince-Ãdouard" } -- Edit bug report at https://bugs.php.net/bug.php?id=60933&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60933&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60933&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60933&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60933&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60933&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60933&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60933&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60933&r=needscript Try newer version: https://bugs.php.net/fix.php?id=60933&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60933&r=support Expected behavior: https://bugs.php.net/fix.php?id=60933&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60933&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60933&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60933&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60933&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=60933&r=dst IIS Stability: https://bugs.php.net/fix.php?id=60933&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60933&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60933&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60933&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60933&r=mysqlcfg