Windows encoding cannot be modified. Modify the linux encoding to make it consistent with the windows encoding. This article mainly summarizes the solutions to the inconsistency between Linux and Windows coding and related points of attention. I hope it can help you.
Check the windows encoding format, open cmd
chcp
Find the corresponding active code page
52936 简体中文(HZ) 936 中国 - 简体中文(GB2312) 950 繁体中文(Big5) 65001 Unicode (UTF-8) 1200 Unicode
Check the encoding format being used by linux
locale
Check which encoding formats are supported by linux
locale -a
Modify linux encoding format (centos7)
vim /etc/locale.conf
Modify to
LANG=zh_CN.gb2312
Note: The blogger’s active code page is 936, which corresponds to the zh_CN.gb2312 code viewed by locale -a
Restart to take effect
reboot
Related recommendations:
Share examples of obtaining current stack information on Linux and Windows
About linux and windowsXP How to deal with the difference in apache address rewriting
Solution to MySQL Chinese garbled code when using QT under Linux and Windows
The above is the detailed content of How to solve the inconsistency between Linux and Windows coding. For more information, please follow other related articles on the PHP Chinese website!