6

A colleague gave me a zip archive of some data I need to analyse, but unfortunately the filenames have been corrupted somewhere along the way, either when creating the archive or when extracting them on my machine.

The archive contains 3000 files whose filenames contain Japanese characters. He zipped it on a Windows machine, and I'm using a Mac. If I double-click on the archive then I get file names that look like this:

0001_rt_ñºéå-ïÅí ñºéå-àÍî _ÉAÅ[ÉãÉeÉBÅ[.dat

On the other hand, if I use 'unzip' at the command line the same file comes out as

0001_rt_%FB+%C4%EE-%F2%FC%C6-%FB+%C4%EE-%EA%DB%F6-_%E2A%FC[%E2%EF%E2e%E2B%FC[.dat

The content of the files is fine (they don't contain any Japanese characters, only numbers), but I need to get at the original file names.

Is there some way I can restore the correct file names without having access to the original files, which are on another computer in another city? I'm up for writing a quick Python script if that's a possibility, but I don't know much about character encodings, so I'm not sure how to go about it.

2
  • Are you sure the file names are corrupt because this sounds more of a OS X problem then a corrupt zip archive problem. Do the files appear corrupt on a Windows machine?
    – Ramhound
    Commented May 5, 2014 at 10:44
  • That might be the case I suppose - I've edited to make that clear. I have no readily available Windows machine to test it on.
    – N. Virgo
    Commented May 5, 2014 at 11:14

1 Answer 1

6

The Unarchiver for OS X is a free app that can deal with this, and it will prompt you for the file name encoding when it cannot detect it properly.

This will override the default program for unzipping files is OS X, but I find it much more powerful than the built-in one.

1
  • Great, thanks! It didn't prompt me, but just got the file names right first time.
    – N. Virgo
    Commented May 5, 2014 at 11:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .