Someone sent me a ZIP file containing files with Hebrew names (and created on Windows, not sure with which tool). I use LXDE on Debian Stretch. The Gnome archive manager manages to unzip the file, but the Hebrew characters are garbled. I think I'm getting UTF-8 octets extended into Unicode characters, e.g. I have a file whose name has four characters and a .doc suffic, and the characters are: 0x008E 0x0087 0x008E 0x0085 . Using the command-line unzip utility is even worse - it refuses to decompress altogether, complaining about an "Invalid or incomplete multibyte or wide character".
So, my questions are:
- Is there another decompression utility that will decompress my files with the correct names?
- Is there something wrong with the way the file was compressed, or is it just an incompatibility of ZIP implementations? Or even misfeature/bug of the Linux ZIP utilities?
- What can I do to get the correct filenames after having decompressed using the garbled ones?
unzip -O cp862 -o "$sub_file"
the. The code page 862 is the code page used to for Hebrew. If your archive is also encrypted with a password, then you're out of luck with theunzip
command because the password needs to be encoded in Hebrew too.