diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-06 00:33:56 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-06 00:33:56 +0000 |
commit | f11a667681c6e8099700f4977c09185be1f9b9bb (patch) | |
tree | 1fdde3ecd954c2f1510b7f20e89421df5b6c644a /encoding.c | |
parent | 9f0b1c9378779e50cb68db7141dc1ec34bbc1709 (diff) | |
download | ruby-f11a667681c6e8099700f4977c09185be1f9b9bb.tar.gz ruby-f11a667681c6e8099700f4977c09185be1f9b9bb.tar.xz ruby-f11a667681c6e8099700f4977c09185be1f9b9bb.zip |
* encoding.c (rb_filesystem_encindex): add fallback to
ASCII-8BIT on Windows.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/encoding.c b/encoding.c index 38a0cf9c7..97d930701 100644 --- a/encoding.c +++ b/encoding.c @@ -1125,6 +1125,7 @@ rb_filesystem_encindex(void) char cp[sizeof(int) * 8 / 3 + 4]; snprintf(cp, sizeof cp, "CP%d", AreFileApisANSI() ? GetACP() : GetOEMCP()); idx = rb_enc_find_index(cp); + if (idx < 0) idx = rb_ascii8bit_encindex(); #elif defined __APPLE__ idx = rb_utf8_encindex(); #else |