2ge
2ge

Reputation: 281

decompress ZIP with given encoding

I got ZIP file(s), which contains files, which filenames are in some encoding. Let's say I know encoding of those filenames, but I still dont know how to properly decompress them.

Here is example file, it contains one file "【SSK字幕组】The Vampire Diaries 吸血鬼日记S06E12.ass"

I know used encoding is GB18030 (Chinese)

Question is - how to unpack that file in FreeBSD using unzip or other CLI utility to get proper encoded filename? I tried everything what I could, but result was never good. Please help.

Upvotes: 0

Views: 3619

Answers (3)

Jonghee Park
Jonghee Park

Reputation: 1275

Below code will work

unzip -O GB18030 gb18030.zip

Upvotes: 3

arrowd
arrowd

Reputation: 34411

You can also simply unpack files with zip and then use converters/convmv to recode their names.

Upvotes: 0

PhML
PhML

Reputation: 1240

You could try with unzip-iconv.

Then, try (from here):

UNZIP="-O YOURENCODING" unzip -x YOURFILE.zip

Upvotes: 0

Related Questions