Re: [PATCH][PR server/24377] Fix mixing English and system default languages in error messages on Windows

Jon Turney
2019-04-02T21:10:25Z

On 02/04/2019 21:57, Ð’Ð»Ð°Ð´Ð¸Ð¼Ð¸Ñ€ ÐœÐ°Ñ€Ñ‚ÑŒÑÐ½Ð¾Ð² wrote:
> I'm able to use results from setlocale(), but how can the user
> influenÑe the result of setlocale?
> I wrote i simple program to display it's result:
> void main(int argc, char* argv[])
> {
> printf("%s\n", setlocale(LC_ALL, 0));
> }
> Then I run it from Cygwin console:
> $ LC_ALL=en_US /cygdrive/c/Programming/Test/Debug/test.exe
> C
> $ LC_ALL=de_DE /cygdrive/c/Programming/Test/Debug/test.exe
> C
>
> Changing env. var doesn't affect setlocale() result.

This test program isn't correct. You must first call setlocale(LC_ALL,
"") to change the locale from the default "C" locale.