Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
how to glob with international or unicode file names?
SpringFlowers AutumnMoon
10/14/2007 11:16:00 AM
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/n...
--
Posted via
http://www.ruby-...
.
2 Answers
7stud --
10/14/2007 5:45:00 PM
0
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
>
I think that means your display device doesn't understand the
characters--not that ruby is unable to retrieve those filenames. For
instance, if I have a file named:
ááá.txt
in the current directory, and I write:
arr = Dir['*']
puts arr
I get:
...
...
ááá.txt
...
...
--
Posted via
http://www.ruby-...
.
7stud --
10/14/2007 5:56:00 PM
0
Hmmm...let's try that again:
7stud -- wrote:
> 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
>>
>
> I think that means your display device doesn't understand the
> characters--not that ruby is unable to retrieve those filenames. For
> instance, if I have a file named:
ááá.txt
in the current directory, and I write:
arr = Dir['*']
puts arr
the output is:
....
....
ááá.txt
....
....
My terminal can display utf-8 encoded characters.
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
how to glob with international or unicode file names?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password