Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm using cygwin:</p> <pre><code>$ locale -a | grep fr_FR fr_FR fr_FR.utf8 fr_FR@euro </code></pre> <p>(note I have no <code>fr_FR.iso88591</code> in the output)</p> <p>Code (file encoding is UTF-8):</p> <pre><code>$collator = new Collator('fr_FR'); var_dump($collator-&gt;getErrorMessage()); // FRENCH_COLLATION is OFF $arr = array('États-Unis', 'Espagne'); var_dump($collator-&gt;getAttribute(Collator::FRENCH_COLLATION) == Collator::ON); var_dump($collator-&gt;getLocale(Locale::VALID_LOCALE)); var_dump($collator-&gt;getLocale(Locale::ACTUAL_LOCALE)); $collator-&gt;asort($arr); var_dump($arr); // FRENCH_COLLATION is ON $collator-&gt;setAttribute(Collator::FRENCH_COLLATION, Collator::ON); $arr = array('États-Unis', 'Espagne'); var_dump($collator-&gt;getAttribute(Collator::FRENCH_COLLATION) == Collator::ON); var_dump($collator-&gt;getLocale(Locale::VALID_LOCALE)); var_dump($collator-&gt;getLocale(Locale::ACTUAL_LOCALE)); $collator-&gt;asort($arr); var_dump($arr); </code></pre> <p>Output:</p> <pre><code>string(23) "U_USING_DEFAULT_WARNING" bool(false) string(5) "fr_FR" string(4) "root" array(2) { [1]=&gt; string(7) "Espagne" [0]=&gt; string(11) "États-Unis" } bool(true) string(5) "fr_FR" string(4) "root" array(2) { [1]=&gt; string(7) "Espagne" [0]=&gt; string(11) "États-Unis" } </code></pre> <p>And here's the trick: <strong>I convert file encoding to ISO 8859-1</strong> (in vim, I do <code>:set fileencoding=iso-8859-1</code>) and try again:</p> <pre><code>string(23) "U_USING_DEFAULT_WARNING" bool(false) string(5) "fr_FR" string(4) "root" array(2) { [0]=&gt; string(10) "▒tats-Unis" [1]=&gt; string(7) "Espagne" } bool(true) string(5) "fr_FR" string(4) "root" array(2) { [0]=&gt; string(10) "▒tats-Unis" [1]=&gt; string(7) "Espagne" } </code></pre> <p>Some symbols are broken, but I think it's because my terminal does not support given codepage. The main thing is that the order of strings now is just what you've described: "Espagne" comes after "États-Unis".</p> <p>So, I think it's a file encoding.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload