Home  >  Article  >  Operation and Maintenance  >  Chinese garbled characters appear when viewing logs in Linux

Chinese garbled characters appear when viewing logs in Linux

王林
王林Original
2020-01-11 11:46:309980browse

Chinese garbled characters appear when viewing logs in Linux

1. Vim modifies the server encoding and changes the encoding item to "zh_CN.UTF-8"

[root@server ~]# vi /etc/sysconfig/i18n

Chinese garbled characters appear when viewing logs in Linux

(free video Tutorial sharing: linux video tutorial)

You can also check whether the server supports this encoding before changing it to "zh_CN.UTF-8". You can use the following command to check:

Chinese garbled characters appear when viewing logs in Linux

2. Just set the encoding of utf8 on Xshell, putty, SSH Secure Shell Client and other clients. Click on the "Properties" item in the "File" option to set it, as follows Picture:

Chinese garbled characters appear when viewing logs in Linux

Done!

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of Chinese garbled characters appear when viewing logs 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