Yes, I tested it. I have working implementation which does more than just creating CRT's _locale_t objects and which emulates thread locales for older CRTs which do not support it natively. It makes heavy use of Windows API locales (LCID or locale names depending on targeted Windows version and CRT).
I haven't uploaded it anywhere yet; I'm currently trying to clean it up and I hope to finally upload it to GitHub in the coming weeks. Needless to say, it's still very WIP. Other than newlocale/uselocale and replacement for setlocale it has: - replacements for [w]ctype.h functions - replacements for C89/C95/uchar.h conversion functions (e.g. no lossy conversion from wchar_t to char) - replacements for string.h and implementation of strings.h functions (which, unlike CRT, can handle multibyte strings) + their wchar.h equivalents - Kirill Makurin ________________________________ From: Bruno Haible <[email protected]> Sent: Thursday, September 18, 2025 4:32 PM To: Kirill Makurin <[email protected]> Cc: [email protected] <[email protected]> Subject: Re: native Windows locale topics Kirill Makurin wrote: > _configthreadlocale only affects the thread-locale setting of the thread that > calls it. It does not affect all threads in the process. Ah really? That isn't clear to me from the documentation. Have you tested it? (I have not tested it; I have only read the documentation.) Bruno
