Doncs això, doneu-li un cop d'ull al programa adjunt.
El que fa es imprimir el resultat de comparar amb strcoll ( strcoll - compare
two strings using the current locale ) dos strings, crear una QAplication y
tornar a comparar els mateixos strings.
El curiós es que el resultat abans de crear la QApplication es correcte, però
després no ho es
$ LC_ALL=ca_ES ./test5
Before creating a QApplication
unit.h unitdescriptor.cpp -1
unitdescriptor.cpp unit.h 1
After creating a QApplication
unit.h unitdescriptor.cpp 4
unitdescriptor.cpp unit.h -4
però el més curiós encara es que si li dic que usi el locale C (sense cap
locale) no falla
$LC_ALL=C ./test5
Before creating a QApplication
unit.h unitdescriptor.cpp -1
unitdescriptor.cpp unit.h 1
After creating a QApplication
unit.h unitdescriptor.cpp -1
unitdescriptor.cpp unit.h 1
Algú te la menor idea de perquè pot passar això?
Gràcies.
Albert.