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: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds


> 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.)


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