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

Re: ls sort order again



On 2006-10-17 06:11:59 +0400, Rad wrote:
> I think there're unicode.

This is not directly related to Unicode (this also happens with
ISO8859-1), but to a language.

> Try this:
> 
> export LC_COLLATE=C

and this will also fix the hyphen-minus problem:

vin:~> printf '%s\n' 1-2 1-3 12 13 | LC_COLLATE=en_US.UTF-8 sort
12
1-2
13
1-3
vin:~> printf '%s\n' 1-2 1-3 12 13 | LC_COLLATE=en_US.ISO8859-1 sort
12
1-2
13
1-3
vin:~> printf '%s\n' 1-2 1-3 12 13 | LC_COLLATE=C sort
1-2
1-3
12
13

Alternatively, one can use LC_COLLATE=POSIX.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)



Reply to: