Default encoding settings for Linux

Source: Internet
Author: User
Tags i18n
Article Title: default encoding settings for Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Modify the/etc/sysconfig/language file, set RC_LANG and RC_LC_ALL to zh_CN.GB2312, and set ROOT_USES_LANG to "yes"

 I. The default encoding settings for Linux.
/Etc/sysconfig/i18n
Controls the system font settings. The language variables are used in/etc/profile. d/lang. sh. An example i18n file:

LANG = "zh_CN.GB18030"
LANGUAGE = "zh_CN.GB18030: zh_CN.GB2312: zh_CN"
SUPPORTED = "zh_CN.GB18030: zh_CN: zh: en_US.UTF-8: en_US: en"
SYSFONT = "lat0-sun16"
The above is to set the system's default character set to GB2312. now many systems default encoding character set is UTF-8. You can set this file to change the default Character Set of the system.
In addition, you can add the PATH variable declaration to the user's environment variable or the user's environment variable file:
Declare in the pre-processing file of the system, which will take effect for the entire system:
# Vi/etc/profile
Add at the end of the file
LC_ALL = "zh_CN.GBK"
Export LANG = "zh_CN.GBK"
Declare in the user's pre-processing file to work for individual users:
# Vi/root/. bash_profile
Add at the end of the file
Export LC_ALL = "zh_CN.GBK"
Export LANG = "zh_CN.GBK"
The above configuration restarts the server to make the change take effect.

II. View the current character set of the system.
Locale: local encode, which indicates local encoding. This command displays the character set encoding of the current system without any parameters. You can also set environment variables. All parameters are man locale.

[1] [2] Next page

Related Article

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.