bug-coreutils
[Top][All Lists]
Advanced

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

Re: Sort order bug in GNU sort


From: Bob Proulx
Subject: Re: Sort order bug in GNU sort
Date: Thu, 29 Oct 2009 18:56:55 -0600
User-agent: Mutt/1.5.18 (2008-05-17)

Luke Hutchison wrote:
> The following is the output of GNU sort (without any switches) on an
> unsorted file.  Numerous errors (of the same variety) seem present in the
> ordering.  I am using coreutils-7.2-4.fc11.x86_64.

Please say what locale you are using.

  $ locale

Try sorting with a standard locale.

  LC_ALL=C

Frequently this is a user misunderstanding of how the user specified
locale effects the collation sequence and sort ordering.  It appears
to me that your specified locale is en_US.UTF-8 or similar.  In that
locale punctuation is ignored and case is ignored.  IIRC it is
dictionary ordering.

Here is a reference.

  
http://www.gnu.org/software/coreutils/faq/#Sort-does-not-sort-in-normal-order_0021

> Problems are shown in red.

Please, no HTML to mailing lists.  We can't see your coloring.

  http://www.gnu.org/software/coreutils/

Personally I set the following to achieve my desired result.  YMMV.

  export LANG=en_US.UTF-8
  export LC_COLLATE=C

Bob




reply via email to

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