I need to decompress zip files generated in Windows with Japanese language. I'm using unzip.
If I use unzip files.zip I will get bad file names. So, according to this question, I used unzip with -O cp932 to decompress them. In this way, I can get correct file names.
However, some of these zip files require passwords. I know the correct passwords, but unzip always tells me the passwords are wrong.
After some investigation, I found out I can successfully decompress zip files with pure English passwords. That is, zip files with password like "Hello" will work, but a password like "こんにちは" leads to "wrong password". So I guess it has something to do with character encoding.
Actually, I tried both of these:
unzip -O cp932 compressed.zipand pasted "こんにちは" when it asked for password.unzip -O cp932 -P 'こんにちは' compressed.zip.
None of them work.
I found a similar question here which has no answer. It looks like that question was asking for a way to provide any byte sequence to unzip as the password. If that question has an answer, then the solution would also apply to my question, since I can manually convert the passwords into correct character encoding, and give the converted string to unzip.