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
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
SpringFlowers AutumnMoon wrote:
with the Dir[" path "]
or Dir.globis 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
…
…
Hmmm…let’s try that again:
7stud – wrote:
SpringFlowers AutumnMoon wrote:
with the Dir[" path "]
or Dir.globis it possible to glob the filenames with unicode or international
characters in it? Right now it is returning ???.mp3I 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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs