[Bug localedata/14039] New: strcoll inverted(?) order of uppercase/lowercase characters

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/14039] New: strcoll inverted(?) order of uppercase/lowercase characters

glaubitz at physik dot fu-berlin.de
http://sourceware.org/bugzilla/show_bug.cgi?id=14039

             Bug #: 14039
           Summary: strcoll inverted(?) order of uppercase/lowercase
                    characters
           Product: glibc
           Version: 2.13
            Status: NEW
          Severity: normal
          Priority: P2
         Component: localedata
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]
                CC: [hidden email]
    Classification: Unclassified


This is probably invalid, just wanted to raise a potential issue with strcoll.

When sorting ascii characters using their ascii codes 'A' < 'a'. Strcoll does
the opposite 'a' < 'A' and 'ą' < 'Ą'. The problem with this approach is that,
for performance reasons, a lot of programs use ascii comparison and fall back
on strcoll when they encounter unicode characters. This results in inconsistent
sorting, for example 'A' < 'a' and 'ą' < 'Ą'.

Should this particular sorting rule be arbitrary, would it be possible to
change it (to match ascii order)?

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug localedata/14039] strcoll inverted(?) order of uppercase/lowercase characters

glaubitz at physik dot fu-berlin.de
http://sourceware.org/bugzilla/show_bug.cgi?id=14039

Andreas Schwab <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Andreas Schwab <[hidden email]> 2012-05-01 07:04:36 UTC ---
If you want to approximate strcoll with strcmp you must first convert the
string with strxfrm.

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.