Monday, November 12, 2012

Handle ZIP Archives with non-ASCII Filename

The workhorse is lsar/unar from The Unarchiver project.
http://code.google.com/p/theunarchiver/

Installation (Ubuntu 12.04 or above):

sudo apt-get install unar

Usage:

# Try list files first 
# Filename encoding will be automatically detected
lsar foo.zip
# If filename is already correct, unarchive
unar foo.zip

# If automatic detection fails
# Manually specify a encoding and check the result
lsar -e ENC foo.zip
# Once correct encoding is found, unarchive
unar -e ENC foo.zip

Reference: 

http://manpages.ubuntu.com/manpages/precise/en/man1/lsar.1.html
http://manpages.ubuntu.com/manpages/precise/en/man1/unar.1.html

No comments:

Post a Comment