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

Eli Zaretskii
2019-04-03T04:48:26Z

> From: Ð’Ð»Ð°Ð´Ð¸Ð¼Ð¸Ñ€ ÐœÐ°Ñ€Ñ‚ÑŒÑÐ½Ð¾Ð² <vilgeforce@gmail.com>
> Date: Tue, 2 Apr 2019 23:57:35 +0300
> Cc: gdb-patches@sourceware.org
>
> > - You're not checking all the environment variables which might control
> > the locale for the message locale category (See e.g. [1]). I don't think
> > there's any need to do this by hand, since you should be able to use the
> > result of setlocale(LC_MESSAGE, NULL)?
>
> Yes, you are right, I missed "LANGUAGE" var because it's in another
> file in /intl/
> Wish I had a function for this. _nl_locale_name from intl/localename.c
> looks good,but it doesn't read LANGUAGE var and I have errors when
> include intl/gettextP.h
>
> I'm able to use results from setlocale(), but how can the user
> influenÑe the result of setlocale?

Beware: only the Cygwin setlocale supports environment variables, the
native MS-Windows implementation used by MinGW does not.