File#path
is giving me Latin-1 characters -- is there a way to get it to give me utf8 characters, or should I just convert what it returns? If so, what's the best/easiest way to convert?
elaboration
So, I know I can do this:
Iconv.new('UTF-8','LATIN1').iconv(File.basename(file.path))
But I'm wondering if there is a more elegant way to tell File
to give me utf8 to begin with.
This is especially important because for some reason I get back a different charset on different systems. On my OS X dev machine, it looks like I get back utf8. On my linux server, latin-1.