Solve Chinese garbled characters in Centos7

Source: Internet
Author: User
1. First, check the default character set commands used by the system: locale or echo $ LANG. if the Chinese language pack has been selected during installation, the default is the UTF-8 character set [root @ localhost ~] # LocaleLANG = zh_CN.UTF-8LC_CTYPE = & quot; zh_CN.UTF-8 & quot; LC_NUMERIC = & quot; zh_CN.UTF-8

First, check the current system default character set command: locale or echo $ LANG, if the original installation has selected a Chinese language pack, then the default is the UTF-8 character set

[Root @ localhost ~] # Locale
LANG = zh_CN.UTF-8
LC_CTYPE = "zh_CN.UTF-8"
LC_NUMERIC = "zh_CN.UTF-8"
LC_TIME = "zh_CN.UTF-8"
LC_COLLATE = "zh_CN.UTF-8"
LC_MONETARY = "zh_CN.UTF-8"
LC_MESSAGES = "zh_CN.UTF-8"
LC_PAPER = "zh_CN.UTF-8"
LC_NAME = "zh_CN.UTF-8"
LC_ADDRESS = "zh_CN.UTF-8"
LC_TELEPHONE = "zh_CN.UTF-8"
LC_MEASUREMENT = "zh_CN.UTF-8"
LC_IDENTIFICATION = "zh_CN.UTF-8"
LC_ALL =
[Root @ localhost ~] # Echo $ LANG
Zh_CN.UTF-8

 

2, SecureCRT modification, Options → session options, the appearance of the character set to the UTF-8, the other terminal program is the same

 

3. if the character set in step 1 is displayed as other characters, install the chinese character package and run the command: yum-y groupinstall chinese-support.

After installation, modify the character encoding configuration. Command: vim/etc/locale. conf change LANG = "XXXX" to LANG = "zh_CN.UTF-8", note that the character set configuration file for Centos7 is/etc/locale. conf. if it is a version earlier than 7, modify/etc/sysconfig/i18n. after modification, remember reboot.

 

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.