Here's the output of locale
:
LANG=zh_CN.GBK
LC_CTYPE="zh_CN.GBK"
LC_NUMERIC="zh_CN.GBK"
LC_TIME="zh_CN.GBK"
LC_COLLATE="zh_CN.GBK"
LC_MONETARY="zh_CN.GBK"
LC_MESSAGES="zh_CN.GBK"
LC_PAPER="zh_CN.GBK"
LC_NAME="zh_CN.GBK"
LC_ADDRESS="zh_CN.GBK"
LC_TELEPHONE="zh_CN.GBK"
LC_MEASUREMENT="zh_CN.GBK"
LC_IDENTIFICATION="zh_CN.GBK"
LC_ALL=
How can I change all of them to UTF8
?
How can I make the locale setting persistent in CentOS 5.5?
In CentOS try with system-config-language command. That's the CentOS way :) Also you can try with:
Do you mean in the current session or permanently?
If you just need it in the current shell you can export the
LC_ALL
variable. For example:If you mean to do it permanently or system-wide it varies from distribution from distribution. What's yours?
Red-Hat like distros (Centos, SL) come with file
which contains by default (well, in my case)
And above file is being sourced by /etc/profile.d/lang.sh
I my case I wanted to change en_GB.UTF-8 to en_GB.iso88591 so I found that “proper” way of doing it was to append /etc/sysconfig/i18n with
Once that done locale for each account on the system should be saying:
As I suppose, after your encoding, your are chinese from mainland, you need first the chinese locale :
Then you can export you locale as :
if you want to configure this system-wide :
change /etc/locale.conf to:
The second line is for rules about comparing string.
Or for an user, you can just add it in you ~/.bashrc or ~/.profile
In CentOS 7, I was able to change the default system language by editing
This is where the following variables are set