How to output Chinese garbled characters in remote Linux xshell

Source: Internet
Author: User

When you use xshell to log on to the Chinese version of centos or RedHat, if the output in xshell is Chinese, garbled characters may be displayed. The following method can effectively solve the garbled problem:

Linux Chinese garbled code solution::CopyCodeThe Code is as follows: [root @ localhost ~] # Cd/etc/sysconfig/

[Root @ localhost sysconfig] # cp i18n i18n. Bak # back up the i18n File

[Root @ localhost sysconfig] # echo ""> i18n

[Root @ localhost sysconfig] # vi i18n # Add the following content

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"

However, after this modification, the Chinese characters displayed in the command line of the Linux host are garbled characters. If you do not log on locally, you can use this method.

Solution 2:

You can modify the remote tool encoding to display Chinese characters normally and display the encoding format in the remote tool as utf8 to solve the problem of Linux Chinese garbled characters! Some tools may not have the function of modifying the encoding. We recommend that you use xhell, Which is powerful!

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.