Date: Wed, 19 Jul 2023 09:30:08 +0100 From: Alastair Houghton <ahoughton@...le.com> To: musl@...ts.openwall.com Subject: setlocale() behaviour Hi there, Presently, musl’s setlocale() function essentially always succeeds, even if it doesn’t actually have data for the requested locale. I note the previous message to the list in 2017 <https://www.openwall.com/lists/musl/2017/11/08/1> discussing potential solutions, but unless I’m much mistaken nothing has really changed in the code? This has come up because the test rig for libc++ tries to detect which locale data is installed so that it can run its own locale support tests (it’s trying to test the C++ locale support that it has constructed atop the C library’s underlying locale support). If, for instance, you don’t have data for fr_FR installed, libc++ won’t run test cases that rely on that data. On other C library implementations, that’s easy because setlocale() will return NULL in such a case, but musl doesn’t do that - instead, it sets up a copy of C.UTF-8, names it fr_FR and sets that as the current locale :-( Kind regards, Alastair.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.