Hi,

(11/10/28 15:35), Nikolai Weibull wrote:
> Actually, it°«s probably easier than that.  It can be done on a HFS+
> filesystem (and probably any other, as well) just as easily

It's not true.

> % echo $LC_CTYPE
> UTF-8
> % mkdir t
> % touch t/
> % cat > a.rb
> # -*- coding: utf-8 -*-
> Dir.new('t').entries.each{ |e| printf "%p, %p, %s\n", e, e.encoding,
> File.file?(e) }
> ^D

`e' doesn't have directory prefix, "t/".  It can't stat.

$ ruby -v -C t -e 'Dir.foreach(".") {|e| printf "%p, %p, %p\n", e, e.encoding, File.file?(e)}'
ruby 2.0.0dev (2011-10-25 trunk 33523) [universal.x86_64-darwin11.2.0]
".", #<Encoding:UTF-8>, false
"..", #<Encoding:UTF-8>, false
"", #<Encoding:UTF-8>, true

-- 
Nobu Nakada