This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


пн, 1 апр. 2019 г. в 07:47, Eli Zaretskii <eliz@gnu.org>:
>
> > +  if (LocaleNameToLCID != NULL)
> > +  {
> > +    MultiByteToWideChar (CP_ACP,
> > +                        0,
> > +                        buf,
> > +                        -1,
> > +                        wbuf,
> > +                        COUNTOF (wbuf) - 1);
> > +    lcid = LocaleNameToLCID (wbuf, 0);
>
> This assumes that the code is compiled with UNICODE defined, which
> will then call LocaleNameToLCIDW.  But the code in question is common
> to Cygwin and MinGW compilations, and the latter defaults to UNICODE
> undefined.  So I think you need to call LocaleNameToLCIDW explicitly
> here.

Unfortunately, there is no LocaleNameToLCIDA and LocaleNameToLCIDW,
there is only LocaleNameToLCID which accept widechar strings only. At
least, I'm not able to find LocaleNameToLCIDA or LocaleNameToLCIDW in
MSDN or in kernel32.dll exports. That's the reason I used not
recommended Rfc1766ToLcid function.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]