18 #ifdef HAVE_LANGINFO_H
25 #if defined NO_LOCALE_CHARMAP
26 # error NO_LOCALE_CHARMAP defined
27 #elif defined _WIN32 || defined __CYGWIN__
28 const char *codeset = 0;
29 char cp[
sizeof(
int) * 3 + 4];
35 UINT codepage = GetConsoleCP();
36 if (!codepage) codepage = GetACP();
41 #elif defined HAVE_LANGINFO_H
43 codeset = nl_langinfo(CODESET);
54 #if defined NO_LOCALE_CHARMAP
55 # error NO_LOCALE_CHARMAP defined
56 #elif defined _WIN32 || defined __CYGWIN__
57 char cp[
sizeof(
int) * 8 / 3 + 4];
58 snprintf(
cp,
sizeof cp,
"CP%d", AreFileApisANSI() ? GetACP() : GetOEMCP());
#define rb_usascii_str_new2
const char * nl_langinfo_codeset(void)
VALUE rb_locale_charmap(VALUE klass)
#define rb_enc_to_index(enc)
rb_encoding * rb_default_external_encoding(void)
int rb_enc_find_index(const char *name)
int Init_enc_set_filesystem_encoding(void)
STATIC void unsigned char * cp