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); } //