1--TEST--
2Sort with SORT_LOCALE_STRING
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) == 'WIN') {
6  die("skip Unix locale name only, not available on windows (and crashes with VC6)\n");
7}
8if (false == setlocale(LC_CTYPE, "fr_FR.ISO8859-1", "fr_FR")) {
9  die("skip setlocale() failed\n");
10}
11?>
12--INI--
13unicode.script_encoding=ISO8859-1
14unicode.output_encoding=ISO8859-1
15--FILE--
16<?php
17setlocale(LC_ALL, 'fr_FR.ISO8859-1', 'fr_FR');
18$table = array("AB" => "Alberta",
19"BC" => "Colombie-Britannique",
20"MB" => "Manitoba",
21"NB" => "Nouveau-Brunswick",
22"NL" => "Terre-Neuve-et-Labrador",
23"NS" => "Nouvelle-�cosse",
24"ON" => "Ontario",
25"PE" => "�le-du-Prince-�douard",
26"QC" => "Qu�bec",
27"SK" => "Saskatchewan",
28"NT" => "Territoires du Nord-Ouest",
29"NU" => "Nunavut",
30"YT" => "Territoire du Yukon");
31asort($table, SORT_LOCALE_STRING);
32var_dump($table);
33?>
34--EXPECT--
35array(13) {
36  ["AB"]=>
37  string(7) "Alberta"
38  ["BC"]=>
39  string(20) "Colombie-Britannique"
40  ["PE"]=>
41  string(21) "�le-du-Prince-�douard"
42  ["MB"]=>
43  string(8) "Manitoba"
44  ["NB"]=>
45  string(17) "Nouveau-Brunswick"
46  ["NS"]=>
47  string(15) "Nouvelle-�cosse"
48  ["NU"]=>
49  string(7) "Nunavut"
50  ["ON"]=>
51  string(7) "Ontario"
52  ["QC"]=>
53  string(6) "Qu�bec"
54  ["SK"]=>
55  string(12) "Saskatchewan"
56  ["NL"]=>
57  string(23) "Terre-Neuve-et-Labrador"
58  ["YT"]=>
59  string(19) "Territoire du Yukon"
60  ["NT"]=>
61  string(25) "Territoires du Nord-Ouest"
62}
63