Cannot unzip because of foreign language
So I have a zip file that I have to unzip and cannot do so because I have some characters that are not english. The characters are these ones (ć and cyrilic version of this letter aswell). I have tried p7zip, unzip and none work for me. I have also enabled a few different locales that do contain these characters ( serbian that is ) but sadly still cannot extract it.
About this post
- Posted
- Archived
- Score
- 3 · 100% up
- Kind
- Text
- ID
- nihlsc
5 comments
Though there should be a way to get it to work with 7z, unarchiver has always worked with whatever language archive I've thrown at it, it may be easier to try that. Just unar *.zip
https://archlinux.org/packages/community/x86_64/unarchiver/
That just worked! Thanks.
Another solution, for those distributions that don't have unarchiver in their repository, would be:
...but of course with the charset used in MS-DOS in your country instead of cp437. E.g. for Russia it would be cp866. The "bsdtar" program comes from libarchive.
The explanation is that zip archives have the filenames inside encoded in that DOS charset, and unzip hard-codes conversion from cp437 to ISO-8859-1. bsdtar allows you to specify the source charset, and gets the destination charset from the current locale. The Unarchiver guesses using Mozilla's "chardet" library, sometimes incorrectly.
Not precisely what you need, but you may be able to come up with some ideas based on this...
Unzip archive with none-UTF8 chars
env LANG=C 7z x file.zip
I can't even extract it with ANSI C, still get the same error
"ERROR: Can not open output file : Invalid argument"