The problem with Chinese characters in Linux is usually caused by the character set and Windows incompatibility, and the Chinese character set of Windows is a double-byte GBK encoding.
Linux uses a 3-byte utf-8 encoding, so using tools in Windows to connect to the Linux environment to display Chinese correctly requires the conversion of the Linux character set to a double-byte Simplified Chinese GBK or GB18030 character set, which is commonly used:
Confirm the character set command for the current environment:
Locale
See what the native available character sets are:
Locale–a
To modify the character set command for the current session:
Export Lc_all= "ZH_CN. GB18030 "
Modifying the operating system default character set requires editing the configuration file:
vi/etc/sysconfig/i18n
Then put
The contents of the file are modified to:
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 "
It is recommended that you change the system default prophecy to English "en_US" better
Character set issues under Linux