Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds

Corinna Vinschen
2010-02-28T17:05:33Z

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