bug-coreutils
[Top][All Lists]
Advanced

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

Re: sort -R need not respect locales


From: Pádraig Brady
Subject: Re: sort -R need not respect locales
Date: Mon, 23 Jul 2007 11:11:31 +0100
User-agent: Thunderbird 1.5.0.8 (X11/20061116)

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.
> 
> Empirically, setting LANG or any LC* variable makes the -R option of no 
> effect.
> 
> Under most circumstances sort's locale-respecting behavior makes perfect 
> sense,
> but "randomness" is character set-agnostic. Shouldn't sort -R not care about
> LANG or LC* values?

Is this specific to Fedora 7?

$ rpm -q coreutils
coreutils-6.9-2.fc7
$ echo $LANG
en_IE.UTF-8
$ seq 1 5 | shuf
3
5
1
4
2
$ seq 1 5 | sort -R
1
2
3
4
5
$ ./sort --version
sort (GNU coreutils) 6.9+ (lastest git)
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and Paul Eggert.
address@hidden src]$ seq 1 5 | ./sort -R
4
2
1
5
3

Pádraig.




reply via email to

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