The characters like '\xDA' or '\xFA' are not valid representations of anything in UTF-8, so toupper and tolower return the character itself in that locale.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
All of them have
XFAIL: with_system_cxx_lib=x86_64-apple-darwin11
XFAIL: with_system_cxx_lib=x86_64-apple-darwin12
Maybe that's it. I don't have access to OS X, so I can't test it there.
I've tested this patch on OS X and these 4 tests that you've changed now fail.
The XFAIL: with_system_cxx_lib lines don't have any effect on my system - these tests get invoked as expected by lit. Let me know if there's anything else I can do to help you.
That's surprising. Seems like something is different on OS X.
Could you try compiling/running this small program?
#include <locale> #include <iostream> int main() { std::locale x("en_US.UTF-8"); std::cout << x.name() << std::endl; }
If it prints "en_US.UTF-8", then I'm out of ideas... :)
"XFAIL: with_system_lib=..." are used for testing against OS X's installed libc++, which is very rarely done. @arphaman is probably testing against the in-tree libc++ on OS X, which is why the XFAIL's have no effect.
Seems like something is different on OS X.
The reason for the different output on Linux and OS X is that they each provide their own different locale data. In particular they provide different toupper/tolower conversion tables. For some reason the ones on OS X seem to support UTF-16 conversions as well. Currently GLIBC doesn't even support UTF-8 multi-byte characters.
While I was attempting to review this patch I ended up coming up with fixed tests myself. I committed them in r290746. I'm very sorry to step on your toes.
However there are plenty more //XFAIL: linux localization tests to fix!