From b507930297de6991910ee086ca06af1fac5b5363 Mon Sep 17 00:00:00 2001 From: usa Date: Sat, 22 Dec 2007 02:37:40 +0000 Subject: [PATCH] * encoding.c (rb_locale_charmap): win32 support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ encoding.c | 2 ++ 2 files changed, 6 insertions(+) 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 + + * encoding.c (rb_locale_charmap): win32 support. + Sat Dec 22 11:31:14 2007 Eric Hodel * 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