Centos 5 Chinese Language Pack Linux view Chinese support commands centos Chinese Language Pack Installation configuration system default encoding Linux piconv file gb2312 to UTF-8
Turn: http://hi.baidu.com/visual_art/item/f8c7dde0993dcbf32a09a4f3
Install all Chinese Fonts
Yum install fonts-Chinese
Install Chinese support
Yum install fonts-IOS885Array
View Chinese support information
Locale
As long as it is UTF-8 encoding on the right.
Display result
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 =
If you do not select Chinese when installing centos, you can install the Chinese language support in the following ways.
# Yum install "@ Chinese support"
You can also useYum grouplistTo list all groups and ages
Chinese support
View #Echo $ Lang
General Chinese system should be zh_CN.utf-8, if the English version of the installation and the installation of the Chinese support package is the en_US.UTF-8 to modify the/etc/sysconfig/language file, rc_lang, rc_lc_all to zh_cn.gb2312, set root_uses_lang to "yes"
The following content is displayed in the English version of the default installation.
# Cat/etc/sysconfig/i18n
Lang = "en_US.UTF-8"
Sysfont = "latarcyrheb-sun16"
Linux piconv file gb2312 convert UTF-8
Use iconv. If not, use piconv. Usage
Iconv-F "GBK"-T "UTF-8" <infile> OUTFILE
Piconv-F "GBK"-T "UTF-8" <infile> OUTFILE
If there are too many files, write a bash script and put it in the directory to convert the encoding.
Script.
#! /Bin/bash
Iconv = iconv
If! Which $ iconv &>/dev/null
Then
Iconv = piconv
Fi
For I in * Action. cpp
Do
$ Iconv-F "GBK"-T "UTF-8" <"$ I"> "$ I. utf8"
Ret = $?
If [$ ret-EQ 0]; then
MV-F "$ I" "$ I. Backup"
MV-F "$ I. utf8" "$ I"
Else
Echo "fail to convert $ I from GBK to UTF-8"
Fi
Done
Exit $ RET
# End
This script will convert your original GBK encoding file to a new utf8 file, and the original file will be renamed to * Action. cpp. Backup, not tested,
Some content comes from the network