# How to glob with international or unicode file names?

**URL:** <https://www.ruby-forum.com/t/how-to-glob-with-international-or-unicode-file-names/117187>\
**Category:** Rails I18n\
**Created:** [October 14, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/how-to-glob-with-international-or-unicode-file-names/117187 "2007-10-14T14:46:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [October 14, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/how-to-glob-with-international-or-unicode-file-names/117187/1 "2007-10-14T14:46:51Z")

</div>

with the Dir[" path "]  
or Dir.glob

is it possible to glob the filenames with unicode or international  
characters in it? Right now it is returning ???.mp3

to test it, you can grab some international characters at

[http://news.google.com/news?ned=hk](http://news.google.com/news?ned=hk)

---

<div class="post-metadata">

**Author:** ![winterheat](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7993a0/32.png) [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Post date:** [February 2, 2009, 5:03pm UTC](https://www.ruby-forum.com/t/how-to-glob-with-international-or-unicode-file-names/117187/2 "2009-02-02T17:03:16Z")

</div>

I know this is an old post, but I was wondering if there is a way to do  
this? I’ve been trying to use Ruby to do more of my scripting, but I  
have to keep switching back to python because I can’t find a way to open  
files that use unicode characters in their name. I’ve tried Ruby 1.9  
which I thought would deal with this, but it doesn’t seem to work.

Am I missing something?

Any help is appreciated.

SpringFlowers AutumnMoon wrote:

> with the Dir[" path "]  
> or Dir.glob
> 
> is it possible to glob the filenames with unicode or international  
> characters in it? Right now it is returning ???.mp3
> 
> to test it, you can grab some international characters at
> 
> [http://news.google.com/news?ned=hk](http://news.google.com/news?ned=hk)
