[PATCH] D25811: [libcxx] Fix toupper/tolower tests for UTF-8 locale
Eric Fiselier via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 30 01:41:07 PST 2016
EricWF added a comment.
In https://reviews.llvm.org/D25811#586053, @kparzysz wrote:
> In https://reviews.llvm.org/D25811#586000, @arphaman wrote:
> > 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.
"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!
More information about the cfe-commits