Home >Operation and Maintenance >Linux Operation and Maintenance >What are the solutions to garbled characters when decompressing zip files in Linux?

What are the solutions to garbled characters when decompressing zip files in Linux?

王林
王林Original
2019-12-07 13:30:304277browse

What are the solutions to garbled characters when decompressing zip files in Linux?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn