Bob Proulx wrote:
> Michael A. Smith wrote:
>> sort -R works well when LC_ALL=POSIX; however, sort -R sorts in exactly the
>> same way as sort with no options with my LANG=en_US.UTF-8 and
>> LC_CTYPE=ja_JP.UTF8 settings.
> 
> Thanks for the report.  But I cannot recreate your problem.
> 
>> Empirically, setting LANG or any LC* variable makes the -R option of
>> no effect.
> 
> Can you create a small test case that shows the problem such that you
> can share it with the mailing list?  Also what version are you
> running?  Here is what I see.
> 
>   $ sort --version
>   sort (GNU coreutils) 6.9+
> 
>   $ seq 1 5 | LC_ALL=en_US.UTF-8 sort -R
>   2
>   5
>   4
>   1
>   3
> 
> Bob

Gladly, Bob, and thanks for the quick response.

[EMAIL PROTECTED] ~ $ sort --version
sort (GNU coreutils) 6.9
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and Paul Eggert.

[EMAIL PROTECTED] ~ $ locale -a
C
en_US
en_US.utf8
ja_JP
ja_JP.eucjp
ja_JP.utf8
POSIX
zh_CN
zh_CN.gb2312
zh_CN.gbk
zh_CN.utf8

[EMAIL PROTECTED] ~ $ export | grep LANG; export | grep LC; seq 1 5 | sort -R
declare -x LANG="en_US.UTF-8"
declare -x LC_CTYPE="ja_JP.UTF8"
1
2
3
4
5

[EMAIL PROTECTED] ~ $ export -n LANG LC_CTYPE; seq 1 5 | sort -R
4
3
2
1
5

Finally, for completeness' sake, I ran the following loop:
[EMAIL PROTECTED] ~ $ for i in $(locale -a); do echo; echo $i; export LANG=$i; 
seq
1 5 | sort -R; done

C
3
2
4
1
5

en_US
1
2
4
3
5

en_US.utf8
1
2
3
4
5

ja_JP
1
2
3
4
5

ja_JP.eucjp
1
2
3
4
5

ja_JP.utf8
1
2
3
4
5

POSIX
2
4
1
5
3

zh_CN
1
2
3
4
5

zh_CN.gb2312
1
2
3
4
5

zh_CN.gbk
1
2
3
4
5

zh_CN.utf8
1
2
3
4
5



_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to