From: Nikolai Weibull Date: 2011-10-28T15:15:00+09:00 Subject: [ruby-core:40486] Re: [ruby-core:40482] [ruby-trunk - Bug #5486] rb_stat() doesn’t respect input encoding On Fri, Oct 28, 2011 at 07:28, Usaku NAKAMURA wrote: > Sorry, I can't understand your point. > If you think there is a bug, would you show us the bug by code? That���s hard to do, but name a file in an encoding other than 'filesystem' on an NTFS filesystem. What I did was accidentally create a file whose name was encoded in UTF-16. Then, do Dir['dir'].entries.each{ |e| printf "%p: %s\n", e, File.file? e }, where 'dir' is the directory containing this file. e.file? will return false for this file, even though it���s a file. The problem is, as explained, in rb_stat(), as it re-encodes its argument in the 'filesystem' encoding.