GNU bug report logs - #17188
Sort bugs

Previous Next

Package: coreutils;

Reported by: Nikos Balkanas <nbalkanas <at> gmail.com>

Date: Sat, 5 Apr 2014 02:27:02 UTC

Severity: normal

Tags: notabug

Merged with 17189

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Blake <eblake <at> redhat.com>
To: Nikos Balkanas <nbalkanas <at> gmail.com>, Bob Proulx <bob <at> proulx.com>
Cc: 17188 <at> debbugs.gnu.org
Subject: bug#17188: Sort bugs
Date: Mon, 07 Apr 2014 06:46:37 -0600
[Message part 1 (text/plain, inline)]
On 04/05/2014 02:44 PM, Nikos Balkanas wrote:

> What about sorting input based on the input's locale, instead of the
> system's?

And how do you propose to detect the input's locale?  The canonical way
to tell a program what locale the input is in is by setting the
environment variable LC_COLLATE and/or LC_ALL.

> Sort
> can distinguish ASCII (iso) from UTF-8 and collate accordingly.

ASCII is a subset of UTF-8.  There is no way to tell if input was
intended as one or the other without setting an environment variable to
make your intentions clear - but this is precisely what you already do
to get sort to do what you want.  And since this behavior is mandated by
POSIX (the behavior of LC_ALL and friend controlling how 'sort' and all
other utilities will collate, based on the definition of the chosen
locale), it is better to point people to a consistent standard that will
work across ALL implementations of 'sort', than it is to invent yet
another non-standard knob for just GNU sort.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 11 years and 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.