1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@21930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2009-02-01 21:53:14 +00:00
parent 845103b751
commit 9bd77cfd77
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Mon Feb 2 06:51:36 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* 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.
Sun Feb 1 21:27:55 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/raddrinfo.c (addrinfo_ipv4_private_p): new method.

View file

@ -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");