bug-coreutils
[Top][All Lists]
Advanced

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

bug#17188: Sort bugs


From: Nikos Balkanas
Subject: bug#17188: Sort bugs
Date: Sat, 5 Apr 2014 23:44:52 +0300

On Sat, Apr 5, 2014 at 11:23 PM, Bob Proulx <address@hidden> wrote:

[...snip...]


> Originally the locale was C.  If you go back to the C locale things
> will be working for you as you wish it to work.  It will work as it
> worked before.  Agreed?
>
> Then you changed something.  You changed the locale.  You in your
> environment set LANG=en_US.UTF-8 (or similar equivalent).  That is
> when you notice that sort doesn't work as you want it to work.
>

What about sorting input based on the input's locale, instead of the
system's? Sort
can distinguish ASCII (iso) from UTF-8 and collate accordingly. Even users
in UTF-8
systems (like me) get ASCII files smts and need to collate them correctly.
For sanity
purposes users could override the locale with a command line option.

[...snip...]

>
>   The only way to fix it is to fix it at the source of the problem.  The
> source is the locale collation sequence.  Which is why I always set
> this in my environment.
>
>   export LANG=en_US.UTF-8
>   export LC_COLLATE=C
>
> But while that works for most western locales I have no idea how that
> would interact with chinese big5 for example.  Probably badly.  So it
> can't really be offered as a general solution to the problem.  But if
> you are using one of the set of western locales that it works for then
> it does solve the problem for you.
>

That is dangerous. I don't know how much software will stop working
correctly because of that.
Of course, one can always return locale back to its original value, but
problems might not be that obvious at all :-(

[...snip...]


> Bob
>


reply via email to

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