Hello, all!

What I have is not a problem with perl on Mac OS X, but rather a problem on Mac OS X that I'd like to solve using perl. I'm not sure how to go about solving it, and am looking for suggestions.

I have a number of files that were created on Windows that have Japanese characters in the file name. The files were sent to me zipped. When the zip archive is uncompressed with English as the main language under Mac OS X, the filenames are malformed. (iirc, if Japanese is the main language, this isn't a problem, but it's been awhile since I've done that, and I wouldn't want to have to switch languages and relaunch the Finder every time I unzipped a file that might have Japanese in the filename.)

I'd like to make a perl script that would rename the files, but I'm not sure how to force reading the characters as a different encoding, nor sure which encoding I should use. I can handle a little trial and error with the last part (trying different encodings should be a simple matter of a foreach loop :), but am not sure how to approach the re-encoding part.

Hints, pointers, perldoc references much appreciated.

Michael Glaesemann
grzm myrealbox com



Reply via email to