CentOS6.6 system How to set up Chinese

Source: Internet
Author: User

[email protected] ~]# cat A.txt

??


The above is garbled, two question marks.

Chinese support operations are as follows:

1. View current language support

[Email protected] ~]# echo $LANGen _us. UTF-8

2. View installed language Packs

[Email protected] ~]# Localelang=en_us. Utf-8lc_ctype= "en_US. UTF-8 "lc_numeric=" en_US. UTF-8 "Lc_time=" en_US. UTF-8 "Lc_collate=" en_US. UTF-8 "lc_monetary=" en_US. UTF-8 "lc_messages=" en_US. UTF-8 "Lc_paper=" en_US. UTF-8 "Lc_name=" en_US. UTF-8 "lc_address=" en_US. UTF-8 "Lc_telephone=" en_US. UTF-8 "Lc_measurement=" en_US. UTF-8 "lc_identification=" en_US. UTF-8 "lc_all=

3, no Chinese package is installed online

[email protected] ~]# Yum Groupinstall chinese-support

4. View supported character sets after installation is complete

[Email protected] ~]# locale-a

There are many, scroll bars pull down to see the Chinese supported character set

Zh_CNzh_CN.gb18030zh_CN.gb2312zh_CN.gbkzh_CN.utf8zh_HKzh_HK.big5hkscszh_HK.utf8zh_SGzh_SG.gb2312zh_SG.gbkzh_ SG.utf8zh_TWzh_TW.big5zh_TW.euctwzh_TW.utf8zu_ZAzu_ZA.iso88591zu_ZA.utf8

5. View the current character set configuration

[Email protected] ~]# cat/etc/sysconfig/i18nlang= "en_US. UTF-8 "sysfont=" Latarcyrheb-sun16 "

6. Modify the configuration to Chinese character set

[Email protected] ~]# vi/etc/sysconfig/i18n lang= "ZH_CN. GB2312 "supported=" ZH_CN. GB2312:zh_CN:zh "sysfont=" Latarcyrheb-sun16 "

Warm tip: Because I use the remote terminal SECURECRT only support GB2312, so only modified to GB2312, let my securecrt display Chinese, if directly on the virtual machine or Chinese garbled.

If you want to support Chinese directly on the CentOS6.6 terminal, you can view the supported character sets first.

[Email protected] ~]# Localelang=en_us. Utf-8lc_ctype= "en_US. UTF-8 "lc_numeric=" en_US. UTF-8 "Lc_time=" en_US. UTF-8 "Lc_collate=" en_US. UTF-8 "lc_monetary=" en_US. UTF-8 "lc_messages=" en_US. UTF-8 "Lc_paper=" en_US. UTF-8 "Lc_name=" en_US. UTF-8 "lc_address=" en_US. UTF-8 "Lc_telephone=" en_US. UTF-8 "Lc_measurement=" en_US. UTF-8 "lc_identification=" en_US. UTF-8 "lc_all=

This allows you to see that the system supports the UTF-8 character set, followed by the next steps to modify it to the UTF-8 character set.

7, the implementation of the Amendment effective command

[Email protected] ~]# source/etc/sysconfig/i18n

8. Re-view the installed language pack

[Email protected] ~]# LOCALELANG=ZH_CN. Gb2312lc_ctype= "ZH_CN. GB2312 "lc_numeric=" ZH_CN. GB2312 "Lc_time=" ZH_CN. GB2312 "Lc_collate=" ZH_CN. GB2312 "lc_monetary=" ZH_CN. GB2312 "lc_messages=" ZH_CN. GB2312 "Lc_paper=" ZH_CN. GB2312 "Lc_name=" ZH_CN. GB2312 "lc_address=" ZH_CN. GB2312 "Lc_telephone=" ZH_CN. GB2312 "Lc_measurement=" ZH_CN. GB2312 "lc_identification=" ZH_CN. GB2312 "lc_all=

9, re-edit a.txt can see the Chinese

[[email protected] ~]# vi a.txt  Hello    Pro ~                                                                       ~                                                                       ~                                                                      ~                                                                       ~                                                                      ~                                                                       ~                                                                       ~                                                                      ~                                                                       ~                                                                      ~                                                                       ~                                                                       ~                                                                      ~                                                                       ~                                                                       ~                                                                      ~                                                                       ~                                                                       ~                                                                      ~                                                                       ~                                                                      ~                                                                        "A.txt"  1l, 11c written [[email protected] ~]# cat a.txt Hello    Pro 


This article is from the "10628473" blog, please be sure to keep this source http://10638473.blog.51cto.com/10628473/1746095

CentOS6.6 system How to set up Chinese

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.