Description: Use MinGW's version of get_codepage() which supports Windows 2000 Origin: http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/mingw/mingwex/mb_wc_common.h?rev=1.4&content-type=text/x-cvsweb-markup&cvsroot=src Bug: https://sourceforge.net/tracker/?func=detail&aid=3300841&group_id=202880&atid=983354 --- mingw-w64.orig/mingw-w64-crt/misc/mb_wc_common.h +++ mingw-w64/mingw-w64-crt/misc/mb_wc_common.h @@ -1,14 +1,13 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the w64 mingw-runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ - -#include <_mingw.h> -_CRTIMP unsigned int ___lc_codepage_func(void); +#include +#include +#include static inline unsigned int get_codepage (void) { - return ___lc_codepage_func(); + /* locale :: "lang[_country[.code_page]]" | ".code_page" */ + char * cp_string; + if ((cp_string = strchr (setlocale(LC_CTYPE, NULL), '.'))) + return ((unsigned) atoi (cp_string + 1)); + return 0; }