platform/shared/ruby/encoding.c in rhodes-3.4.2 vs platform/shared/ruby/encoding.c in rhodes-3.5.1.12
- old
+ new
@@ -1157,10 +1157,14 @@
int idx;
#if defined NO_LOCALE_CHARMAP
idx = rb_enc_to_index(rb_default_external_encoding());
#elif defined _WIN32 || defined __CYGWIN__
char cp[sizeof(int) * 8 / 3 + 4];
+
+#if !defined(_WP8_LIB)
snprintf(cp, sizeof cp, "CP%d", AreFileApisANSI() ? GetACP() : GetOEMCP());
+#endif
+
idx = rb_enc_find_index(cp);
if (idx < 0) idx = rb_ascii8bit_encindex();
#else
idx = rb_enc_to_index(rb_default_external_encoding());
#endif