6

It happens often that I see unknown file names when uncompressing zip files.

For example,

 ╕╢╣¤└╟╝║-Bb└╠┴╢╛╟▒т┐ы-┼м╢є╕о│▌,┼╫│╩╗Ў╝╥╞∙ ╝╥╟┴╢є│ы╗Ў╝╥╞∙ ,╞о╖│╞ъ

What could be the solution for the problem?

1
  • Unfortunately, the anwser is related with html2txt, which is different from uncompressing tool.
    – Ohmygirl
    May 10, 2015 at 0:12

5 Answers 5

7

Try using p7zip. (@Pilot6 mentioned that p7zip doesn't work well for non UTF-8 encodings, but if you only need for UTF-8, then that's an easy solution.)

apt-get update
apt-get install p7zip-full
7z x thefile.zip -o"outputDir"
7

Korean MS Windows encoding cp-949 may be used to zip the original files. Try unzip with Windows Encoding option.

unzip -O cp-949 <file.zip>

Note: I checked the profile of original poster to know from where he/she is (Seoul, South Korea). For other users, you have to check the origin of zip and change the encoding respectively.

1
  • 1
    This seems the better answer. @user.dz both notes the problem - character encoding - and the (unfortunately) brute force method to solve the problem. It seems ZIP should capture metadata like encoding being used. Feb 27, 2020 at 14:16
1

If you use standard Ubuntu Archive Manager and Ubuntu version 14.04+, then this can be solved by installing patched Archive Manager (file-roller). The problem is that file-roller uses p7zip for unzipping zip archives, if p7zip-full is installed. But p7zip does not handle non-UTF-8 encodings well. I patched file-roller to always use unzip for that purpose. Unzip itself has been fixed. The patched file-roller can be installed from my ppa

sudo add-apt-repository ppa:hanipouspilot/file-roller
sudo apt-get update
sudo apt-get install file-roller
9
  • Installed Ubuntu version 15.04 and your answer has just been tried. Still, the problem is to be solved.
    – Ohmygirl
    May 11, 2015 at 9:57
  • Maybe a little more time is needed to be reflected officially.
    – Ohmygirl
    May 11, 2015 at 10:04
  • That must be a different problem. But is you use just unzip in CLI, does it work OK? It works well for Russian and Greek encodings, but your case must be different. I want to find out where the problem is.
    – Pilot6
    May 11, 2015 at 10:23
  • I would appreciate your help. I tried unzip both in CLI and Unity. The language is Korean(Hangul). Your e-mail address is wanted to send my zip files, if you don't mind.
    – Ohmygirl
    May 11, 2015 at 10:27
  • So unzip does not handle this right? In this case my solution won't help. I suggest reporting a bug in launchpad. Unzip tries to convert filenames coorectly based on your system language. Is it set to Korean?
    – Pilot6
    May 11, 2015 at 10:32
0

miniunzip in package minizip also seems to work fine with non-ascii filenames

0

I succeeded in two ways:

unzip -O cp936 file.zip
unzip -O GBK file.zip

Not the answer you're looking for? Browse other questions tagged or ask your own question.