This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug localedata/5521] New: Collation: "#" < "a" < "#a"; special characters and wrong sorting
- From: "maciej dot blizinski+sources-bugzilla at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 24 Dec 2007 14:33:04 -0000
- Subject: [Bug localedata/5521] New: Collation: "#" < "a" < "#a"; special characters and wrong sorting
- Reply-to: sourceware-bugzilla at sourceware dot org
In C locale, sorting looks like this:
maciej@debian:~$ echo -e 'a\n \n a\n#\n#a\n@\n@a' | LC_COLLATE=C sort | sed -e
's/.*/"&"/'
" "
" a"
"#"
"#a"
"@"
"@a"
"a"
However, in en_US.UTF-8, sorting looks like this:
maciej@debian:~$ echo -e 'a\n \n a\n#\n#a\n@\n@a' | LC_COLLATE=en_US.UTF-8 sort
| sed -e 's/.*/"&"/'
" "
"@"
"#"
"a"
" a"
"@a"
"#a"
I believe that this is wrong. I've observed it on many many hosts, with
different Linux distributions.
--
Summary: Collation: "#" < "a" < "#a"; special characters and
wrong sorting
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: localedata
AssignedTo: libc-locales at sources dot redhat dot com
ReportedBy: maciej dot blizinski+sources-bugzilla at gmail dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=5521
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.