VERY Strange interaction between strcoll, Qt, and locale

Albert Astals Cid tsdgeos@terra.es
Sat Jan 10 01:24:00 GMT 2004


Hi, i have been speaking with Trolltech people with what i though was a Qt 
(their library) bug, but after both them and me looking at it, it seems it is 
a very strange interaction between strcoll, Qt, and the current system 
locale.

I send two attached programs. 

Both are the same except test4 has a QApplication object and test3 has not.
Both use strcoll to compare the same strings. 
Both give the same results with LC_ALL= en BUT if i set LC_ALL=es_ES test3 and 
test4 give to me DIFFERENT results.

Any idea?

Thanks for any input on this.

Albert.

P.S: I'm not subscribed to the list, so please keep me CC'ed

P.S: If you are not familiar with Qt a typical line to compile a QT program is
gcc -o test4 test4.cpp -I $(QtIncludePath) -L $(QtLibPath) -lqt-mt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test3.cpp
Type: text/x-c++src
Size: 596 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20040110/f6d0c732/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test4.cpp
Type: text/x-c++src
Size: 627 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20040110/f6d0c732/attachment-0001.bin>


More information about the Libc-alpha mailing list