How to change the character set to GB2312 in CentOS

Source: Internet
Author: User
Tags centos server
These days are always plagued by a problem, that is, base64 encryption, which cannot be decrypted on the centos server. After repeated tests, it was found that the centos system did not have the GB2312 database. The encryption end is processed in ASP. NET, and the decryption uses java in centos. ASP. NET uses the GB2312 character set by default. Therefore, the corresponding decryption must also use GB2312. For successful resolution, you must make the cen

These days are always plagued by a problem, that is, base64 encryption, which cannot be decrypted on the centos server. After repeated tests, it was found that the centos system did not have the GB2312 database.

The encryption end is processed in ASP. NET, and the decryption uses java in centos. ASP. NET uses the GB2312 character set by default. Therefore, the corresponding decryption must also use GB2312. For successful resolution, centos must also support GB2312. The final problem is solved.

 

The following describes how to set the GB2312 character set in centos.

 

Step 1: Check whether the Chinese support package has been installed
[Root @ localhost ~] # Yum grouplist | grep zh
If not, configure the yum source and install the Chinese support package.
Yum groupinstall "Chinese Support"


Step 2: modify the international system configuration
[Root @ localhost ~] # Vi/etc/sysconfig/i18n
Changed:
LANG = "zh_CN.gb2312"
LANGUAGE = "zh_CN.gb18030: zh_CN.gb2312: zh_CN"
SUPPORTED = "zh_CN.UTF-8: zh_CN: zh: en_US.UTF-8: en_US: en"
SYSFONT = "lat0-sun16"



Step 3: log out and log on again
Check whether the LANG environment variable has been changed to zh_CN.gb2312
[Root @ localhost ~] # Echo $ LANG
Zh_CN.gb2312

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.