This is the mail archive of the libc-alpha@sourceware.cygnus.com 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]

Re: [Rafal Dabrowa <rafal@softsystem.com.pl>] libc/1163: glibc: wrong work of strcoll



Rafal > Really !? See results of this program run on AIX operating system:
Rafal >         $ echo "LANG=$LANG, LC_ALL=$LC_ALL"
Rafal >         LANG=en_US, LC_ALL=en_US
Rafal >         $ strcoll-test B b
Rafal >         strcoll( B, b ) = -1
Rafal >         $ strcoll-test a B
Rafal >         strcoll( a, B ) = 1
Rafal > similar, but there is a big difference: "B" is LESS than "b" an "a" is
Rafal > GREATHER than "B" (on Linux with glibc 2.1.1 is inversely). And I
Rafal > guess, that on AIX is O.K. May be not ?

After running `localedef -i en_US -c -f ISO-8859-1 en_US' on Linux I
get:
$ LANG=en_US ./test-strcoll B b
strcoll( B, b ) = -1

aj@arthur: 09:57:30 /tmp 
$ LANG=en_US ./test-strcoll a B
strcoll( a, B ) = -1

Please check the LC_COLLATE section in the localedata files
(glibc-sources/localedata/locales) that should be installed on your
system in /usr/share/i18n/locales for details about the ordering.

If you're convinced that the localedata files are incorrect, please
tell us which and why - and if you think the strcoll implementation is 
wrong, tell us also.  

I do think the results glibc gives[1] are ok.  If you don't like the
ordering, set LC_COLLATE="C".

Andreas

Footnotes: 
[1]  I don't know why you get different results than me - perhaps you
     didn't run localedef?

-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

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