This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug localedata/5521] New: Collation: "#" < "a" < "#a"; special characters and wrong sorting


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]