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.

Full log


Message #12 received at control <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






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

Previous Next


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