ruby-changes:9860
From: yugui <ko1@a...>
Date: Fri, 9 Jan 2009 11:19:03 +0900 (JST)
Subject: [ruby-changes:9860] Ruby:r21401 (ruby_1_9_1): merges r21342 from trunk into ruby_1_9_1.
yugui 2009-01-09 11:18:40 +0900 (Fri, 09 Jan 2009) New Revision: 21401 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21401 Log: merges r21342 from trunk into ruby_1_9_1. * encoding.c (rb_locale_charmap): use GetConsoleCP() instead of GetACP() because external encoding should be console's one. * encoding.c (rb_filesystem_encoding): use GetOEMCP() instead of GetACP() because VFAT/FAT32 uses OEM CP. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/encoding.c Index: ruby_1_9_1/encoding.c =================================================================== --- ruby_1_9_1/encoding.c (revision 21400) +++ ruby_1_9_1/encoding.c (revision 21401) @@ -1034,7 +1034,7 @@ enc = rb_default_external_encoding(); #elif defined _WIN32 || defined __CYGWIN__ char cp[sizeof(int) * 8 / 3 + 4]; - snprintf(cp, sizeof cp, "CP%d", GetACP()); + snprintf(cp, sizeof cp, "CP%d", GetOEMCP()); enc = rb_enc_find(cp); #elif defined __APPLE__ enc = rb_enc_find("UTF8-MAC"); @@ -1218,7 +1218,7 @@ codeset = nl_langinfo(CODESET); return rb_usascii_str_new2(codeset); #elif defined _WIN32 - return rb_sprintf("CP%d", GetACP()); + return rb_sprintf("CP%d", GetConsoleCP()); #else return Qnil; #endif Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 21400) +++ ruby_1_9_1/ChangeLog (revision 21401) @@ -1,3 +1,11 @@ +Mon Jan 5 17:38:40 2009 NAKAMURA Usaku <usa@r...> + + * encoding.c (rb_locale_charmap): use GetConsoleCP() instead of + GetACP() because external encoding should be console's one. + + * encoding.c (rb_filesystem_encoding): use GetOEMCP() instead of + GetACP() because VFAT/FAT32 uses OEM CP. + Mon Jan 5 16:26:48 2009 Nobuyoshi Nakada <nobu@r...> * encoding.c (rb_filesystem_encoding): use ANSI codepage for file -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/