In linux, use Xshell to view tomcat real-time logs with Chinese garbled characters,

Source: Internet
Author: User

In linux, use Xshell to view tomcat real-time logs with Chinese garbled characters,

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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.