How to modify the character set in Linux

  
                

Learning the knowledge of character sets in Linux system can solve many system problems. The following small series introduces you to the examples of character sets in Linux system. Through examples, you can understand the modification of Linux character set.

question:

When the server is used in the project and to export the query contains Chinese characters, always export fails, null words appear in Excel, what solution?

Solution:

Change the character set of linux.

Path: etc/sysconfig/i18n

The default is:

The code is as follows:

LANG=“en_US.UTF-8”

SYSFONT=“latarcyrheb-sun16”

Modified to:

The code is as follows:

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”

Restart the Linux server.

The above is an example of the modification of the Linux character set. I believe that many of my friends have encountered problems in the text. Just modify the character set in Linux. Is it very simple? Try it out quickly.

Copyright © Windows knowledge All Rights Reserved