GNU bug report logs - #32603
sort bug?

Previous Next

Package: coreutils;

Reported by: Michael Bartman <michael.bartman <at> sparkpost.com>

Date: Fri, 31 Aug 2018 16:36:01 UTC

Severity: normal

Tags: notabug

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #21 received at 32603-done <at> debbugs.gnu.org (full text, mbox):

From: R0b0t1 <r030t1 <at> gmail.com>
To: Eric Blake <eblake <at> redhat.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, 32603-done <at> debbugs.gnu.org,
 michael.bartman <at> sparkpost.com
Subject: Re: bug#32603: sort bug?
Date: Fri, 31 Aug 2018 12:05:56 -0500
[Message part 1 (text/plain, inline)]
On Fri, Aug 31, 2018 at 11:59 AM, Eric Blake <eblake <at> redhat.com> wrote:

> tag 32603 notabug
> thanks
>
>
> On 08/31/2018 11:44 AM, Paul Eggert wrote:
>
>> "sort --help" says:
>>
>> *** WARNING ***
>> The locale specified by the environment affects sort order.
>> Set LC_ALL=C to get the traditional sort order that uses
>> native byte values.
>>
>> and that's what you have run into.
>>
>
> To expound on Paul's answer:
>
> > $ sort <foo
> > t.co
> > tec.co
> > te.co
>
> Let's run that with --debug to make it obvious:
>
> $ printf 't.co\ntec.co\nte.co\n' | sort --debug
> sort: using ‘en_US.UTF-8’ sorting rules
> t.co
> ____
> tec.co
> ______
> te.co
> _____
>
> and realize that en_US.UTF-8 is a locale where punctuation is ignored when
> determining collation order (thus, 'tco' < 'tecco' < 'teco' once you strip
> out the ignored '.').
>
>
I keep seeing these sort "bugs" pop up, they seem to be very popular. At
any point would the default behavior be seen as needing change?

I'm not sure why I'd want to ignore special characters by default, for
example...

Cheers,
    R0b0t1
[Message part 2 (text/html, inline)]

This bug report was last modified 6 years and 349 days ago.

Previous Next


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