Bug #60933 [Com]: Testing asort with SORT_LOCALE_STRING fails on Mac OS X 10.6
| From: | fa@php.net | Date: | Wed, 01 Feb 2012 13:03:39 +0000 |
| Subject: | Bug #60933 [Com]: Testing asort with SORT_LOCALE_STRING fails on Mac OS X 10.6 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167031@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60933&edit=1
ID: 60933
Comment by: fa@php.net
Reported by: mgdm@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:
Works on FreeBSD 8.2-RELEASE with snap php5.4-201202011030
PASS Sort with SORT_LOCALE_STRING [ext/standard/tests/array/locale_sort.phpt]
Previous Comments:
------------------------------------------------------------------------
[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] mgdm@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