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

> 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.

> 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.

-- 
Ki ça vos våye bén,
Pablo Saratxaga

http://www.ping.be/~pin19314/           PGP Key available, key ID: 0x8F0E4975

Reply via email to