[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: QString::localeAwareCompare() in KDE
From:       Thiago Macieira <thiago () kde ! org>
Date:       2009-05-09 9:04:34
Message-ID: 200905091104.35042.thiago () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Albert Astals Cid wrote:
>A Divendres, 8 de maig de 2009, Thiago Macieira va escriure:
>> As you can see, it's basically calling strcoll(3), which is a C
>> library function. Setting the default QLocale will have no effect: you
>> have to set the C library's locale, via setlocale(3).
>>
>> In any case, the sorting you find weird is coming from glibc. There's
>> little we can do.
>
>Another weird consequence of using strcoll
>
>http://sources.redhat.com/ml/libc-alpha/2004-01/msg00145.html
>
>unit.cpp < unitdescriptor.cpp
>unit.h   > unitdescriptor.cpp
>
>That doesn't make sense at all but well libc/locale people is a bit
> obtuse as we all know.

That's the case that Peter is running into:

E & G
E & J
Em & M
E & S

The spaces and the & are ignored, so it sorts "eg", "ej", "emm" and "es".
-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic