Bug 1029784 - Case insensitive sort does not work in multibyte locale
Summary: Case insensitive sort does not work in multibyte locale
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-13 08:30 UTC by Petr Pisar
Modified: 2013-11-13 13:47 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-13 13:46:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2013-11-13 08:30:39 UTC
$ 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 13:23:44 UTC
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 13:46:40 UTC
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.