CentOS changes the character set to GB2312 method

Source: Internet
Author: User
Tags centos server

These days are always plagued by a problem, that is, base64 encryption, can not be decrypted on the CentOS server. After repeated testing only found that the original CentOS system is not GB2312 library caused.

Encrypted ends are handled in ASP. Decryption is Java under CentOS. Asp. NET by default is the GB2312 character set, so the corresponding decryption must also use GB2312. In order to resolve successfully, CentOS must also be supported for GB2312. Finally the problem is solved.


Here's a way to share the GB2312 character set in CentOS.


First step: Check if the Chinese support package is installed
[email protected] ~]# Yum grouplist | grep en
If not, configure the Yum source and install the Chinese support package.
Yum Groupinstall "Chinese support"


Step Two: Change the system internationalization configuration
[Email protected] ~]# vi/etc/sysconfig/i18n
Switch
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 three: Quit Logging in again
Check if the lang environment variable has changed to zh_cn.gb2312
[Email protected] ~]# echo $LANG
zh_cn.gb2312


Many other highlights: http://www.code4apk.com

CentOS changes the character set to GB2312 method

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.