Settings for the CentOS character set locale

Source: Internet
Author: User

LANG
The default value for Lc_*, which is the lowest level setting, is used if lc_* is not set. Similar to Lc_all.

Lc_all
It is a macro that overrides the setting value for all lc_* if the value is set. Note that the value of Lang is not affected by the macro.

1. Lc_collate
define sorting and comparison rules for this environment

2. Lc_ctype
for character classification and string processing, controls how all characters are processed, including character encodings, whether characters are single-byte or multibyte, how to print, and so on. is one of the most important environment variables.

3. Lc_monetary
Currency format

4. Lc_numeric
Non-currency digital display format

5. Lc_time
time and date formats

6. Lc_messages
the language of the prompt message. There is also a language parameter that is similar to lc_messages, but if the parameter is set, the Lc_messages parameter is invalidated. The language parameter can be used to set multiple language information, such as

languane= "Zh_CN.GB18030:zh_CN.GB2312:zh_CN".

================

Our VPS is mainly for domestic users, so the language is basically Chinese. There are many kinds of coding in Chinese, the most popular is UTF8 and GBK. We recommend that customers use UTF8 encoding because this is an international standard that is compatible with any language encoding. To modify the language code under CentOS VPS:

Localedef-c-F UTF-8-I zh_cn zh_cn.utf8export Lc_all=zh_cn.utf8

The first step above is to generate the encoded file, this step is not necessary, the encoding file is generally present, run Localedef--help can see the path of the current encoded file. The second step changes the current encoding to Zh_cn.utf8, and if you want to change it permanently, run:

Echo ' LANG=ZH_CN. UTF-8 ' >/etc/sysconfig/i18necho ' LC_ALL=ZH_CN. UTF-8 ' >>/etc/sysconfig/i18n

Settings for the CentOS character set locale

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.