• View Character Set
The character set is represented in the system as an environment variable, and in CentOS6.5 as an example, it can be viewed in the following ways for the current terminal to use the character set:
The first type:
[Email protected] tmp]# echo $LANGzh _cn. UTF-8
The second type:
[Email protected] ~]# env |grep LANG LANG=ZH_CN. UTF-8
The third type:
[Email protected] ~]# export |grep LANG declare-x lang= "ZH_CN. UTF-8 "
The fourth type:
[Email protected] ~]# locale LANG=ZH_CN. Utf-8lc_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=
Second, the way to modify the character set
Note: If the default language is en_US. UTF-8, it is not possible to display and input Chinese in the Linux character and graphical interface. If the default language is Chinese, such as ZH_CN. GB18030 or zh_cn.gb2312, the character interface cannot be displayed and entered, the graphical interface can be.
There are two ways to modify this:
1, directly set the variable way to modify
Export LANG=ZH_CN. UTF-8
2, modify the file mode, by modifying the/etc/sysconfig/i18n file control
[Email protected] ~]# vim/etc/sysconfig/i18nlang= "ZH_CN. UTF-8 "[[email protected] ~]# source/etc/sysconfig/i18n
View and repair of the Linux character set