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