bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: sort and Chinese numbers


From: Dan Jacobson
Subject: Re: sort and Chinese numbers
Date: 14 Jul 2001 10:24:16 +0800
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Dan" == Dan Jacobson <address@hidden> writes:

Dan> What is my problem? I tried sort(1) with all kinds of options and
Dan> LC_COLLATE etc... but still can't get these wide numbers into order.
Dan> 臺灣省臺中縣東勢鎮慶福里 013鄰慶福街1之5號
Dan> 臺灣省臺中縣東勢鎮慶福里 013鄰慶福街1之8號
Dan> 臺灣省臺中縣東勢鎮慶福里 013鄰慶福街1之7號
Dan> However emacs' sort-lines worked on the first try.
Dan> sort (GNU textutils) 2.0

No kidding Dan, I tried
for i in $(awk 'BEGIN{for(i=1;i<=26;i++)printf " -%c",96+i}')
    do
    echo ======== sort $i: ========
 echo -e '1\n2\n6\n3\n4\n5\n7'|sort $i|cat -vte
done
thus "proving" that none of the sort(1) switches could get these
numbers in order, even though they are sequential 2 byte characters.
[The screen shows wide square versions of the narrow ASCII 1 2 6 3 4 5 7]

Wait, that was with
LC_COLLATE=zh_TW.Big5
but now with
LC_COLLATE=C all the switches sort fine [but -m and -z, no big deal]
gee, one would think that for proper behaviour in a zh_TW.Big5
environment, one would want all the LC stuff set to zh_TW.Big5,
but what do you know, if you want to sort Chinese numbers you got to
turn them off.

[Or is this a Mandrake 7.2 problem?]

odd, is there no function to pretty print
/usr/share/locale/zh_TW.big5/LC_COLLATE as it seems the source of that
file isn't lying around.
Newsgroups: tlug.cle-faq
Newsgroups: gnu.utils.bug
-- 
http://www.geocities.com/jidanni/ Tel886-4-25854780 e-mail:restore .com. 積丹尼



reply via email to

[Prev in Thread] Current Thread [Next in Thread]