#include "mb_wc_common.h" #include #include #define WIN32_LEAN_AND_MEAN #include wint_t btowc (int c) { if (c == EOF) return (WEOF); else { unsigned char ch = c; wchar_t wc = WEOF; MultiByteToWideChar (get_cp_from_locale(), MB_ERR_INVALID_CHARS, (char*)&ch, 1, &wc, 1); return wc; } }