On Sat, 02 Mar 2013 19:03:42 +0100, Bart Els <lists / ruby-forum.com> wrote:

> Hello Forum,
>
>
> The newer ruby 193 has no problem with non-latin file names
>
> $ c:/Ruby193/bin/ruby -e 'Dir.glob("folder/*").each{|f| puts f }'
> folder/折快抖抉志快抗批 技快忱志快忱抆
>
> $ c:/Ruby193/bin/ruby -e 'Dir.glob("folder/*/*").each{|f| puts f }'
> folder/折快抖抉志快抗批 技快忱志快忱抆/扼志我扶抆我
>
>
> But the older ruby 187 does not deal well with these files:
>
> $ c:/Ruby187/bin/ruby -e 'Dir.glob("folder/*").each{|f| puts f }'
> folder/???????? ???????
>
>
> Is there a fix for this, apart from upgrading to ruby 193 ?
>
> - Bartels
>

Most probably the encodings of the filenames you receive from Dir.glob are different than the encoding your console uses. (Although I have no idea which encoding these might be.)

You might be able to use Iconv for converting them.

-- Matma Rex