summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--encoding.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 97beb0df24..f94c868e89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sat Dec 22 11:37:06 2007 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * encoding.c (rb_locale_charmap): win32 support.
+
Sat Dec 22 11:31:14 2007 Eric Hodel <drbrain@segment7.net>
* gem_prelude.rb: Place bin dir before lib dir so gem bin stubs work.
diff --git a/encoding.c b/encoding.c
index 2f77f02d08..457d940dd7 100644
--- a/encoding.c
+++ b/encoding.c
@@ -792,6 +792,8 @@ rb_locale_charmap(VALUE klass)
char *codeset;
codeset = nl_langinfo(CODESET);
return rb_str_new2(codeset);
+#elif defined _WIN32
+ return rb_sprintf("CP%d", GetACP());
#else
return Qnil;
#endif