Chinese encoding in names of compressed files in zip

Solution 1:

Try:

unzip -O cp936 "严蔚敏数据结构(c语言版)教材及答案.zip"

Solution 2:

I would extract the files, then do a

ls | chardet

to see what it says.

Also, you could try different encodings with

ls | iconv -f GB2312

for example. You could see the encoding known to iconv with iconv -l.

Once determined the encoding, let's suppose is GB2312, you should modify the filenames, to change the encoding to UTF8

for f in *; do
  g="$(iconv -f GB2312 <<<"$f")"
  mv "$f" "$g"
done

EDIT

Tried a brute force attack to your zip file, converting to every known encoding, but none of them seems to me to be plausible

#!/bin/bash

iconv -l | 
  sed  's|//$||' | 
  while read enc; do 
    printf "\n --- $enc ---\n\n"
    ls | iconv -cf "$enc" 2>/dev/null
  done