Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / March 2005



Tip: Looking for answers? Try searching our database.

Malformed filenames

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Glaesemann - 03 Mar 2005 11:48 GMT
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
Kino - 03 Mar 2005 12:08 GMT
> 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.

I have no idea about a perlish way to correct them but you can try some
applications.
<http://docs.info.apple.com/article.html?artnum=86182>
<http://www.yk.rim.or.jp/~harakei/unifix.shtml>

As they are not new, they may not work on Panther.

Kino
Michael Glaesemann - 04 Mar 2005 00:10 GMT
Resending, as I neglected to cc the list.

>> 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
[quoted text clipped - 7 lines]
>
> As they are not new, they may not work on Panther.

Thanks for the quick response! I couldn't get the first to install, but
Unifix looks promising.

ありがとうございました!

Michael Glaesemann
grzm myrealbox com
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.