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


> From: Владимир Мартьянов <vilgeforce@gmail.com>
> Date: Tue, 2 Apr 2019 23:08:38 +0300
> Cc: gdb-patches@sourceware.org
> 
> пн, 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.

You are right, it was my mistake.  Sorry.


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