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

王林
Release: 2019-12-07 13:30:30
Original
4230 people have browsed it

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也可以)
Copy after login

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″
Copy after login

3. Use the jar command to decompress the zip package

For example:

jar xvf file.name
Copy after login

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!

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template