Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution of inconsistent coding between Linux and Windows

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The Windows encoding cannot be modified. Modify the linux encoding to make it consistent with the windows encoding.

View the windows encoding format and open cmd

Chcp

Find the corresponding active code page

52936 simplified Chinese (HZ) 936 China-simplified Chinese (GB2312) 950 traditional Chinese (Big5) 65001 Unicode (UTF-8) 1200 Unicode

View the encoding format being used by linux

Locale

See which encoding formats linux supports

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, corresponding to the zh_CN.gb2312 code viewed by locale-a

Restart takes effect

Reboot

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report