Solution One, use Pyton to deal with
1.VI uzip File
2. Copy content (Python)
#!/usr/bin/env python
#-*-Coding:utf-8-*-
# uzip.py
Import OS
Import Sys
Import ZipFile
Print "Processing File" + sys.argv[1]
File=zipfile. ZipFile (Sys.argv[1], "R");
For name in File.namelist ():
Utf8name=name.decode (' GBK ')
Print "Extracting" + utf8name
pathname = Os.path.dirname (utf8name)
If not os.path.exists (pathname) and pathname!= "":
Os.makedirs (Pathname)
data = File.read (name)
If not os.path.exists (utf8name):
fo = open (Utf8name, "w")
Fo.write (data)
Fo.close
File.close ()
3.chmod +x Uzip
4../uzip Xxxx.zip
Method 2, using the Unzip line command to extract the specified character set
Unzip-o CP936 Xxx.zip (with GBK, GB18030 can also)
Interestingly, there is no description of this option in Unzip's manual, and Unzip–help has a simple line for this parameter.
Method 3, in the environment variable, specify the unzip parameter, always display the decompression file in the specified character set
Add 2 lines to the/etc/environment
unzip= "-O Cp936″
zipinfo= "-O Cp936″
Method 4, using Java Jar command to extract the ZIP package jar Decompression
Jar XVF File.name