From 7e1050e604157245694d00f344afad286ec46347 Mon Sep 17 00:00:00 2001 From: usa Date: Fri, 6 Feb 2009 09:18:46 +0000 Subject: [PATCH] * win32/win32.c (rb_w32_readdir_with_enc): fallback to OS convertion when ASCII-8BIT is passed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ win32/win32.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 444913c786..2b4eca309b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Feb 6 18:18:07 2009 NAKAMURA Usaku + + * win32/win32.c (rb_w32_readdir_with_enc): fallback to OS convertion + when ASCII-8BIT is passed. + Fri Feb 6 17:19:23 2009 NAKAMURA Usaku * win32/{dir.h, win32.c} (rb_w32_readdir_with_enc): new function to diff --git a/win32/win32.c b/win32/win32.c index c5bcf534cc..4c92ef19b9 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1674,7 +1674,10 @@ rb_w32_readdir(DIR *dirp) struct direct * rb_w32_readdir_with_enc(DIR *dirp, rb_encoding *enc) { - return readdir_internal(dirp, ruby_direct_conv, enc); + if (enc == rb_ascii8bit_encoding()) + return readdir_internal(dirp, win32_direct_conv, NULL); + else + return readdir_internal(dirp, ruby_direct_conv, enc); } //