From: Timo Hoepfner Date: 2006-01-13T00:21:29+09:00 Subject: Dir.entires and UTF-8 Hi, What's going on here? Ths is on MacOS X 10.4.4. Looks like Dir#entries returns strings encoded with some encoding I didn't expect. How can I convert the string to UTF8? $KCODE='UTF8' require 'jcode' s="�������" puts s.split(//).inspect # => ["�", "�", "�", "�", "�", "�", "�"] test_dir="/tmp/test" `mkdir #{test_dir}` `touch #{test_dir}/#{s}` f=Dir.entries(test_dir).last puts f.split(//).inspect # => ["a", "", "o", "", "u", "", "�", "A", "", "O", "", "U", ""] Timo