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

sort is not worked propertly



Hello!

I have file "data.txt":

------ begin file -------
centreboard C
centre C
centre C
centreing C
------- end file --------

Command

sort data.txt

produces

-------------------------
centreboard C
centre C
centre C
centreing C
-------------------------

I'm confused. This result is wrong. Command

sort --version

produces: 

--------------------------------------------------------------------------
sort (GNU textutils) 2.0
Written by Mike Haertel.

Copyright (C) 1999 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
---------------------------------------------------------------------------

I get old "sort" and type

sort data.txt 

again. Old "sort" produces

----------------------------
centre C
centre C
centreboard C
centreing C
----------------------------

This result is right. Command

sort --version

produces

--------------------------------------------------------------------------
sort (GNU textutils) 1.22
--------------------------------------------------------------------------

    I see, new "sort" is wrong because it process locale settings 
incorrectly. I have "LANG=ru_RU.KOI8-R", but if I set "LANG=C", new "sort" 
works fine.

    My distribution: Debian GNU/Linux 2.2 (POTATO)

Victor Vislobokov
Perm, Russia



Reply to: