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--FILE--
13<?php
14setlocale(LC_ALL, 'fr_FR.ISO8859-1', 'fr_FR');
15$table = array("AB" => "Alberta",
16"BC" => "Colombie-Britannique",
17"MB" => "Manitoba",
18"NB" => "Nouveau-Brunswick",
19"NL" => "Terre-Neuve-et-Labrador",
20"NS" => "Nouvelle-�cosse",
21"ON" => "Ontario",
22"PE" => "�le-du-Prince-�douard",
23"QC" => "Qu�bec",
24"SK" => "Saskatchewan",
25"NT" => "Territoires du Nord-Ouest",
26"NU" => "Nunavut",
27"YT" => "Territoire du Yukon");
28asort($table, SORT_LOCALE_STRING);
29var_dump($table);
30?>
31--EXPECT--
32array(13) {
33  ["AB"]=>
34  string(7) "Alberta"
35  ["BC"]=>
36  string(20) "Colombie-Britannique"
37  ["PE"]=>
38  string(21) "�le-du-Prince-�douard"
39  ["MB"]=>
40  string(8) "Manitoba"
41  ["NB"]=>
42  string(17) "Nouveau-Brunswick"
43  ["NS"]=>
44  string(15) "Nouvelle-�cosse"
45  ["NU"]=>
46  string(7) "Nunavut"
47  ["ON"]=>
48  string(7) "Ontario"
49  ["QC"]=>
50  string(6) "Qu�bec"
51  ["SK"]=>
52  string(12) "Saskatchewan"
53  ["NL"]=>
54  string(23) "Terre-Neuve-et-Labrador"
55  ["YT"]=>
56  string(19) "Territoire du Yukon"
57  ["NT"]=>
58  string(25) "Territoires du Nord-Ouest"
59}
60