Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How to fix wrongly encoded filenames?

by wollmers (Scribe)
on Mar 18, 2014 at 10:10 UTC ( [id://1078752]=note: print w/replies, xml ) Need Help??


in reply to How to fix wrongly encoded filenames?

Most Linux/Unix filesystem store the names as bytes, and can use any encoding (whatever the locale of the user/shell is).

Modern Windows (NTFS, vFAT with long file names) and MAC OSX HFS+ use UCS-2/UTF-16. In some situations non-ASCII in filenames on OSX is escaped. OSX also is "case conserving", which means that e.g. Foo.txt and foo.txt in the same directory point to the same file. Maybe Windows is also case conserving (a Win-guy told me so yesterday.

Thus filenames are not portable between (the most popular) operating systems unless you restrict filenames to ASCII a-zA-Z0-9_+.- and avoid case-duplicates.

In your case you maybe should unpack on a Linux-system, URL-encode the filenames, and then transfer them to Win. But keep in mind that on Linux filenames can be 255 bytes long, whereas Win allows 255 UCS-2 characters.

  • Comment on Re: How to fix wrongly encoded filenames?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-25 21:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found