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?

UPDATE

How can I persist the locale in centos 5.5?

link|improve this question

40% accept rate
feedback

2 Answers

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:

export LC_ALL=en_US.UTF-8

If you mean to do it permanently or system-wide it varies from distribution from distribution. What's yours?

link|improve this answer
mine is centos 5.5. – locale May 31 '11 at 3:22
feedback

In CentOS try with system-config-language command. That's the CentOS way :) Also you can try with:

localedef -c -f UTF-8 -i en_US en_US.UTF-8
export LC_ALL=en_US.UTF-8
link|improve this answer
what's localedef -c -f UTF-8 -i en_US en_US.UTF-8 for? – locale May 31 '11 at 5:03
It's used to define your locale to en_US and en_US.UTF-8 – boris quiroz Jun 2 '11 at 23:25
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.