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

Eli Zaretskii
2010-02-28T18:59:55Z

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