GNU bug report logs - #40226
sort: expected sort order when -c in use

Previous Next

Package: coreutils;

Reported by: Richard Ipsum <richardipsum <at> vx21.xyz>

Date: Wed, 25 Mar 2020 17:55:02 UTC

Severity: normal

Full log


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

From: Richard Ipsum <richardipsum <at> vx21.xyz>
To: bug-coreutils <at> gnu.org
Subject: sort: expected sort order when -c in use
Date: Wed, 25 Mar 2020 18:37:38 +0100
Hi,

I'm trying to understand something and thought it would be good to ask
here.

I get different results for a case-insensitive sort using -c. My
understanding is that -f should lead to lower case characters with upper
case equivalents being converted to their upper case equivalents. This
doesn't seem to be happening for the C locale though.

% echo -e "aaaa\nAAAA" | LC_COLLATE=en_GB.UTF-8 sort -c -f -
% echo -e "aaaa\nAAAA" | LC_COLLATE=en_US.UTF-8 sort -c -f -
% echo -e "aaaa\nAAAA" | LC_COLLATE=C sort -c -f -
sort: -:2: disorder: AAAA

Is this considered a bug or an expected difference between the locales?

Thanks,
Richard




This bug report was last modified 5 years and 170 days ago.

Previous Next


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