I got a
zip archive containing files some of which with a name containing German umlaute, such as ö. The
unzip command on a terminal fails to create such files, complaining about an illegal byte sequence.
How can I fix that issue?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
I ran the following command:
touch ö && zip -R ö.zip ö && rm ö && unzip ö.zip
It doesn't complain here. You have to specify your problem a bit further, or to upload the archive somewhere.
Did some googling, the problem is related to Zip's encoding. Two possible solutions:
Use open, as in open fileWithUnicodeCharacters.zip. It looks like open will call an internal OS X program that has no problem open these type of .zip files.
Replacing unzip utility used in our script with ditto
zip fails with:
Archive: archive.zip error: cannot create filename?.txt Illegal byte sequence
the Archive Utility app:
open <path to zip file>
ditto command, which has proven to be more resilient than
zip when uncompressing files with Unicode characters in their names:
ditto -V -x -k <path to zip file> <destination folder>
<path to zip file> is the full or relative path to your zip file
<destination folder> is the folder that will contain the uncompressed files