Re: [Nautilus-list] Sorting Directories First



"Blad, John Erling" wrote:
> >The problem is that a default way of handling sorting has to be chosen.
> >No matter how you look at it, or what your opinion is, choosing one way
> >of sorting will make some people think it's broken.
> >Either you think that the several-hundred-year-old sorting rules in many
> >languages are broken and the 30-year-old UNIXism with sorting capital
> >letters first is the way to go, or you accept that this 30-year-old
> >UNIXism was only a long-lived bug and that sorting should done
> >"according to the book" by default, and sorting the old way should be
> >left only as a compability option (for people used to the old, broken
> >way of sorting).
> 
> Please use the locale! There *are* a number of extremly good reasons for
> using it!
> 
> Many languages contains characters that will be sorted more or less
> on random otherwise. Of course you could add code for something like
> 160 languages in common use! ;)
> 
> Some countries also defines theire own sorting rules in addition to the
> ones given by characters in the language. Don't know how much of this
> the locale handles.. For examle, "_name" and "$name" are not necessarilly
> sorted on teh same side as "name". Even more funny, in Norway you will
> find something like
> 
> Andersen
> Berntson
> Chander
> ..
> ..
> Wold
> Zachariassen
> &Aelig;se
> Øberg
> Aabel
> Åberg
> 
> If you can't figure out the chars try to upload it into a HTML page.
> Now, note the name "Aabel" which comes completly out of context..
> In Norway, Denmark and Sweden this is the right sort order. I don't
> know if any locale figures this out!
>
> For those who cares, writing of &Aring" as "Aa" has historical resons
> in Norway.

Actually, "aa" is treated as two "a" in Swedish and sorted accordingly,
FWIW. "å" is never written as "aa" in Swedish.

Yes, the locale's sorting rules is what is used for sorting in Nautilus
now (see http://bugzilla.eazel.com/show_bug.cgi?id=3410).

It works for Swedish at least and uses (on my glibc 2.2 system) the
extended Swedish sorting rules that was implemented in that version of
glibc by Ulrich Drepper on my request.
Those sorting rules are taken from the book "Svenska skrivregler" by
"Svenska språknämnden" (Committee for the Swedish language) and
includes, in addition to the official sorting for the Swedish alphabet,
sorting rules for 30 other characters commonly used in other
Scandinavian and European languages, including some Slavic languages.
It works great. :-)


Christian





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]