ruby-changes:10534
From: usa <ko1@a...>
Date: Fri, 6 Feb 2009 18:18:56 +0900 (JST)
Subject: [ruby-changes:10534] Ruby:r22088 (trunk): * win32/win32.c (rb_w32_readdir_with_enc): fallback to OS convertion
usa 2009-02-06 18:18:46 +0900 (Fri, 06 Feb 2009) New Revision: 22088 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22088 Log: * win32/win32.c (rb_w32_readdir_with_enc): fallback to OS convertion when ASCII-8BIT is passed. Modified files: trunk/ChangeLog trunk/win32/win32.c Index: ChangeLog =================================================================== --- ChangeLog (revision 22087) +++ ChangeLog (revision 22088) @@ -1,3 +1,8 @@ +Fri Feb 6 18:18:07 2009 NAKAMURA Usaku <usa@r...> + + * 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 <usa@r...> * win32/{dir.h, win32.c} (rb_w32_readdir_with_enc): new function to Index: win32/win32.c =================================================================== --- win32/win32.c (revision 22087) +++ win32/win32.c (revision 22088) @@ -1674,7 +1674,10 @@ 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); } // -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/