How to Use Xshell to view tomcat real-time logs with Chinese garbled characters in linux
When you use Xshell to view tomcat real-time logs, Chinese characters are garbled, but the Chinese characters in the log files are not garbled. There may be two reasons. The i18n of the system may not support Chinese characters, or the Xshell encoding format does not support Chinese characters. The solution is as follows:
1. Configure the i18n System File
Vi/etc/sysconfig/i18n
The configuration content is as follows:
LANG = "zh_CN.GB18030" LANGUAGE = "zh_CN.GB18030: zh_CN.GB2312: zh_CN" SUPPORTED = "zh_CN.GB18030: zh_CN: zh: en_US.UTF-8: en_US: en" SYSFONT = "lat0-sun16"
2. restart the system
Reboot
3. If garbled characters exist, set the Xshell encoding format.
File -- Properties -- Terminal Translation option Encoding: Select UTF-8
The end...