Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: encoding of file names

by almut (Canon)
on Mar 25, 2010 at 20:14 UTC ( #830956=note: print w/replies, xml ) Need Help??

in reply to encoding of file names

You could try to Encode::decode() $filename, e.g. from UTF-8, if you suspect that's how the names are stored in the filesystem.

Replies are listed 'Best First'.
Re^2: encoding of file names
by amir_e_a (Hermit) on Mar 25, 2010 at 20:53 UTC

    That's the thing - i would probably try using Encode, but i don't know the from encoding. The to encoding is supposed to be utf8.

    Or do you mean to say that UTF-8 and utf8 are different things?

      but i don't know the from encoding

      I think you can't do much harm by just trying 'UTF-8' as the from encoding :)

      $filename = decode("UTF-8", $filename);

      When your file names are in fact in UTF-8, things will likely work out fine. Otherwise, you'll know they aren't UTF-8 encoded, and you can try some other encoding...

        Thanks, it seems to work!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://830956]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2020-01-26 08:39 GMT
Find Nodes?
    Voting Booth?