Edit report at https://bugs.php.net/bug.php?id=60933&edit=1
ID: 60933 Updated by: ras...@php.net Reported by: m...@php.net Summary: Testing asort with SORT_LOCALE_STRING fails on Mac OS X 10.6 Status: Open Type: Bug Package: Arrays related Operating System: Mac OS X 10.6 PHP Version: 5.4SVN-2012-01-30 (SVN) Block user comment: N Private report: N New Comment: Bug 41758 is a won't fix simply because it is against PHP6 and we aren't fixing bugs in that dead branch at this point. This also a different issue since this one appears to be OSX-specific. This same test passes nicely on various versions of Debian and Ubuntu Linux. Previous Comments: ------------------------------------------------------------------------ [2012-02-01 13:03:39] f...@php.net Works on FreeBSD 8.2-RELEASE with snap php5.4-201202011030 PASS Sort with SORT_LOCALE_STRING [ext/standard/tests/array/locale_sort.phpt] ------------------------------------------------------------------------ [2012-02-01 03:58:53] carloschilazo at gmail dot com I think this goes waaay back to: 41758 And bug 41758 is in status Won't fix, I couldn't find why. Is there a reason behind this? Thanks ------------------------------------------------------------------------ [2012-01-30 13:50:47] m...@php.net 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 this bug report at https://bugs.php.net/bug.php?id=60933&edit=1