GNU bug report logs - #35587
sort order wrt lower/upper case

Previous Next

Package: coreutils;

Reported by: Toralf Förster <toralf.foerster <at> gmx.de>

Date: Sun, 5 May 2019 19:02:01 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35587 in the body.
You can then email your comments to 35587 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#35587; Package coreutils. (Sun, 05 May 2019 19:02:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Toralf Förster <toralf.foerster <at> gmx.de>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sun, 05 May 2019 19:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Toralf Förster <toralf.foerster <at> gmx.de>
To: bug-coreutils <at> gnu.org
Subject: sort order wrt lower/upper case
Date: Sun, 5 May 2019 21:01:11 +0200
I'd expect "B" being the first line here:

	echo a B c d | xargs -n 1 | sort

using sys-apps/coreutils-8.30 at a stable hardened Gentoo Linux, but it is "a". Is this a bug or a feature?
(origin use case was "lsmod | sort" where now the head line of lsmod isn't any longer the first line of the output.

--
Toralf
PGP C4EACDDE 0076E94E





Information forwarded to bug-coreutils <at> gnu.org:
bug#35587; Package coreutils. (Sun, 05 May 2019 19:27:01 GMT) Full text and rfc822 format available.

Message #8 received at 35587 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Toralf Förster <toralf.foerster <at> gmx.de>,
 35587 <at> debbugs.gnu.org
Subject: Re: bug#35587: sort order wrt lower/upper case
Date: Sun, 5 May 2019 13:26:02 -0600
tags 35587 notabug
close 35587
stop

Hello,

On 2019-05-05 1:01 p.m., Toralf Förster wrote:
> I'd expect "B" being the first line here:
> 
> 	echo a B c d | xargs -n 1 | sort
> 
> using sys-apps/coreutils-8.30 at a stable hardened Gentoo Linux, but it is "a". Is this a bug or a feature?

This is just a matter of your locale (e.g. "de_DE.UTF8" ?)
that sorts letters without regard to case.

If you force C locale you'll get "B" first:

  $ echo a B c d | xargs -n 1 | LC_ALL=C sort
  B
  a
  c
  d


Adding "--debug" will show a warning and help diagnose such issues in 
the future:

  $ sort --debug
  sort: using ‘ca_EN.utf8’ sorting rules
  ...
  ...

As such, I'm closing this as not-a-bug, but discussion can continue by 
replying to this thread.

-assaf






Added tag(s) notabug. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 05 May 2019 19:27:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 35587 <at> debbugs.gnu.org and Toralf Förster <toralf.foerster <at> gmx.de> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 05 May 2019 19:27:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 03 Jun 2019 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 329 days ago.

Previous Next


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