Bug 1029784 - Case insensitive sort does not work in multibyte locale
Case insensitive sort does not work in multibyte locale
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-13 03:30 EST by Petr Pisar
Modified: 2013-11-13 08:47 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-13 08:46:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Petr Pisar 2013-11-13 03:30:39 EST
$ printf 'A\nB\na\n' | LC_ALL=en_US.UTF-8 sort -i
A
B
a
$ rpm -qf $(type -p sort)
coreutils-8.21-20.fc21.x86_64

This probably because of broken multi-byte patch (bug #1003544) because coreutils-8.21-16.fc20.x86_64 sorts as expected:

$ printf 'A\nB\na\n' | LC_ALL=en_US.UTF-8 sort -i
a
A
B
Comment 1 Ondrej Vasik 2013-11-13 08:23:44 EST
Does occur even with the C locales... btw. -i doesn't mean case insensitive sort - it does mean "ignore nonprinting characters". I think you want -f option, which seems to work properly.

With coreutils-8.21-20 (compiled on RHEL-6)
printf 'A\nB\na\nb\n' | LC_ALL=C ./sort -i
A
B
a
b

printf 'A\nB\na\n' | LC_ALL=C ./sort -f
A
a
B

printf 'A\nB\na\n' | LC_ALL=en_US.UTF-8 ./sort -f
A
a
B

For me, it looks more like something was fixed than broken. Can you confirm?
Comment 2 Petr Pisar 2013-11-13 08:46:40 EST
God damn! I lived in a lie until now. The `-f' option works for me. I tested it  in en_US.UTF-8, cs_CZ.UTF-8 and C locales.

Note You need to log in before you can comment on or make changes to this bug.