[htdig] RE: [Cooker] SORT and locale


Subject: [htdig] RE: [Cooker] SORT and locale
From: NEPOTE Charles (Neuilly Gestion) (charles.nepote@cetelem.fr)
Date: Wed May 17 2000 - 06:52:57 PDT


Adieusatz !

> Kaixo!
>
>
> On Wed, May 17, 2000 at 01:45:12PM +0200, NEPOTE Charles
> (Neuilly Gestion) wrote:
>
> > With Mandrake 7.0 or a cooker installed in french.
> >
> > when I :
> >
> > "sort db.wordlist"
>
> > I obtain :
>
> > tue i:1
> > tué i:1
> > tue i:2
> > tué i:2
>
> > Shouldn't it be :
>
> > tue i:1
> > tue i:2
> > tué i:1
> > tué i:2
>
> No.
> The whole line is used for sorting; and "1" < "2". while "e"
> is equal to "é"
> ("é" becomes > "e" only when all other things are equal).
>
> To have the result you want you must tell to sort on only the
> first column:
>
> sort -k1 db.wordlist
>
> which gives:
>
> tue i:1
> tue i:2
> tué i:1
> tué i:2

sort -k1 db.wordlist
doesn't do it on my machine (same result as the first one).

I tried also :
sort -k 1 db.wordlist
sort -b -k1 ...
sort -b -k 1 ...
no more results...

 
> > Because an accent in french *make sense* : "tué" is very
> different from
> > "tue".
>
> But, for sorting order, "é" is the same as "e", when major differences
> exist (whcih is the case here, "2" > "1").
> Coinsider "tuéa" and "tueb" (I know, those words dont exist,
> is just for
> example). you expect "tuéa" to be before "tueb" right ?
> It is the same thing here.

All right. Thanks to DindinX too.

> > This result make ht://Dig working bad with some documents...
>
> Because your logic is wrong. If you intend to sort on only
> the first field
> and not on the i:number thing; you must tell it; with the -k
> parameter to
> the command 'sort'.
>
> > I tried to put :
> > LC_ALL=en
>
> Won't change anything; 'en' locale uses the same LC_COLLATE data.

That's what Gilles Detilleux from the ht://Dig group told me to try.
I'm sending a copy to him.

 
> --
> Ki ça vos våye bén,
> Pablo Saratxaga
>
> http://www.ping.be/~pin19314/ PGP Key available, key
> ID: 0x8F0E4975

On gran marci ! (en la lan-oua de Savoué (francoprovençal de Savoie)).
Charles Népote.



This archive was generated by hypermail 2b28 : Wed May 17 2000 - 04:45:23 PDT