1. Unzip through the unzip command and specify the character set
unzip -O CP936 xxx.zip (用GBK, GB18030也可以)
Recommended online video tutorial: linux video tutorial
2 . In the environment variable, specify the unzip
parameter to always display and decompress the file in the specified character set. Add the following 2 lines to
/etc/environment
:
UNZIP=”-O CP936″ ZIPINFO=”-O CP936″
3. Use the jar command to decompress the zip package
For example:
jar xvf file.name
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of What are the solutions to garbled characters when decompressing zip files in Linux?. For more information, please follow other related articles on the PHP Chinese website!