This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 28 Feb 2010 18:05:23 +0100
- Subject: Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds
- References: <20100228130500.GG5683@calimero.vinschen.de> <838wadcn94.fsf@gnu.org>
- Reply-to: gdb-patches at sourceware dot org
On Feb 28 18:56, Eli Zaretskii wrote:
> > Date: Sun, 28 Feb 2010 14:05:00 +0100
> > From: Corinna Vinschen <vinschen@redhat.com>
> >
> > +/* The default output charset for Cygwin is UTF-8. The default output
> > + charset for Win32 is the default ANSI codepage of the system, which
> > + depends on the localization of the underlying Windows system. However,
> > + CP1252 is a good default replacement for ISO-8859-1 at least. */
> > +#if defined (__CYGWIN__)
> > +#define GDB_DEFAULT_TARGET_CHARSET "UTF-8"
> > +#elif defined (_WIN32)
> > +#define GDB_DEFAULT_TARGET_CHARSET "CP1252"
> > +#endif
>
> Why cp1252? why not detect the ANSI codepage at run time, and make
> more non-Latin users happy?
How? Is there somewhere a function which converts a Windows codepage
number into a iconv compatible codeset string?
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat