diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-02 08:07:31 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-02 08:07:31 +0000 |
| commit | 1525a9c9f0b1fd754e39965b34fe259647d9175a (patch) | |
| tree | c6fd93a2041930983faea37666c2dfd4d6a06fe2 /encoding.c | |
| parent | f40e0879d77dc2e5bd6f575ec629984704f79b80 (diff) | |
merges r21930 from trunk into ruby_1_9_1.
* encoding.c (rb_filesystem_encoding): Windows' filesystem encoding is
sometimes ANSI code page and sometimes OEM code page. we should check
whether code page is used.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@21958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
| -rw-r--r-- | encoding.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c index 337942bf7..4afee36ff 100644 --- a/encoding.c +++ b/encoding.c @@ -1034,7 +1034,7 @@ rb_filesystem_encoding(void) enc = rb_default_external_encoding(); #elif defined _WIN32 || defined __CYGWIN__ char cp[sizeof(int) * 8 / 3 + 4]; - snprintf(cp, sizeof cp, "CP%d", GetOEMCP()); + snprintf(cp, sizeof cp, "CP%d", AreFileApisANSI() ? GetACP() : GetOEMCP()); enc = rb_enc_find(cp); #elif defined __APPLE__ enc = rb_enc_find("UTF8-MAC"); |
