Martin Storsjö <[email protected]> wrote: > On Wed, 8 Jul 2026, Kirill Makurin wrote: > >> You can pass different locales (simple strings such as "English", >> "German", "Korean" etc. will suffice), and you will see that written >> time string differs from one locale to another, although not much. > > Hmm, indeed. > > I tested around a little with another test program, and UCRT manages to > set locales with more standard like names such as "de_DE" and > "de_DE.UTF-8", while msvcrt only accepts names like "German".
Older CRTs generally support only "Language_Country" format; these "Language" and "Country" strings can be obtained by calling GetLocaleInfo functions. > In any case, I remembered trying to run the libc++ testsuite on msvcrt, > and I had to XFAIL a number of locale tests there, but those tests do > indeed only try to set locales with the standard(?) names (like > "en_US.UTF_8"), so that certainly won't work on msvcrt. (I never tried to > see if it would pass if I'd replace it with names that msvcrt recognizes.) The "ll_CC" format seems to be referred to as XPG format; at least that's how it is was referred to in discussions on bug-gettext mailing list. > So perhaps I misremembered and it's just that it doesn't accept all the > same locale name spellings as UCRT does. Yes, UCRT accepts the "ll_CC" format for UTF-8 locales; this format is not supported by older CRTs and with any other charset. If you're interested, I summarized locale string formats supported in CRT in this message: https://sourceforge.net/p/mingw-w64/mailman/message/59266372/ - Kirill Makurin _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
