perl-unicode

Re: Unicode::Collate question

2003-12-02 04:30:04
Le 1 déc. 03, à 18:33, Jarkko Hietaniemi a écrit :


% perl -Mutf8 -e 'binmode(STDOUT, ":utf8"); print join " ", sort qw(côte côté cote coté)'
cote coté côte côté

Is this the famous French "backwards accents" rule in action?
(http://www-clips.imag.fr/geta/gilles.serasset/tri-du-francais.html)
(no, I don't speak French)

But in this case, with those particular words, I think ISO Latin 1 (none
of the characters are beyond ISO Latin 1) just "happens" to work right.
o < ô, and e < é.

That also happens to be the order the most popular French dictionnary uses,
but the link you provide thinks otherwise, precisely because of the
"backwards accents" rule, it sorts those words as (ignoring capitalization)
 cote côte coté côté

So I guess I need a Ligua:XX::Sort module for each language I operate on, in my original posting I was misled to believe that Unicode::Collate would
be the tool to use.

Thanks to all for the useful links provided in this thread.

--
Eric Cholet

<Prev in Thread] Current Thread [Next in Thread>