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

Eli Zaretskii eliz@gnu.org
Sun Feb 28 18:59:00 GMT 2010


> Date: Sun, 28 Feb 2010 18:52:39 +0100
> From: Corinna Vinschen <vinschen@redhat.com>
> 
> Windows has a function GetACP() which returns the current ANSI
> codepage.  iconv wants a string which determines the source and
> target codesets.  I don't know any function in Windows which 
> converts a codepage number into an iconv-compatible codeset name.

How about `sprintf (str, "CP%u", GetACP ())' ?

(I'm probably still missing something.)



More information about the Gdb-patches mailing list