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: [ping] [PATCH] Different outputs affected by locale


> Date: Thu, 12 Jun 2014 22:37:38 +0800
> From: Yao Qi <yao@codesourcery.com>
> CC: Tom Tromey <tromey@redhat.com>, Joel Brobecker <brobecker@adacore.com>,	<gdb-patches@sourceware.org>
> 
> GetACP doesn't depend on locale, so I don't think LC_CTYPE=C affects the
> host-charset in GDB.

Indeed, it doesn't.

> However, I do this:
> 
>   printf ("%d\n", GetACP());
> 
>   setlocale (LC_CTYPE, "");
>   printf ("%d\n", GetACP());
> 
>   setlocale (LC_CTYPE, "C");
>   printf ("%d\n", GetACP());
> 
> On my Windows machine, 1252 is printed three times.

As expected: GetACP returns the _default_ codepage, and the default
does not change when you change a locale.  And the iswprint function
doesn't consult the default codepage.  So I don't think this issue
with GetACP is at all relevant.


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