In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how to solve the problem of household connection CentOS system garbled code, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.
When using the CentOS system, we often encounter the problem of garbled code when the ssh client connects to the CentOS system. This time we propose a solution to this problem.
After the CentOS system configuration is completed, it can display Chinese normally. After checking it, it is found that it supports the utf-8 character set.
However, the connection between putty and ssh secure shell found garbled code, which is mainly manifested in the execution of vim garbled code and su command garbled code.
Use the $locale command to view, and it appears as follows:
LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:zh
LC_CTYPE= "zh_CN.UTF-8"
LC_NUMERIC= "zh_CN.UTF-8"
LC_TIME= "zh_CN.UTF-8"
LC_COLLATE= "zh_CN.UTF-8"
LC_MONETARY= "zh_CN.UTF-8"
LC_MESSAGES= "zh_CN.UTF-8"
LC_PAPER= "zh_CN.UTF-8"
LC_NAME= "zh_CN.UTF-8"
LC_ADDRESS= "zh_CN.UTF-8"
LC_TELEPHONE= "zh_CN.UTF-8"
LC_MEASUREMENT= "zh_CN.UTF-8"
LC_IDENTIFICATION= "zh_CN.UTF-8"
LC_ALL=
Solution:
1. For the putty0.6 version
a. Modify the content of / ect/sysconfig/i18n on CentOS system to: LANG= "zh_CN.UTF-8"
b. Modify windows- > Appearance- > font setting in the configuration window of putty to the new Song style, character No. 10.
Modify the Receive data assumed to be in which character set of Translation to:
UTF-8 . (because there is no Chinese character set, GB2312 or cp936 in the list below).
After the modification is completed, putty will normally support Chinese display.
two。 For the ssh secure shell version.
a. Change the configured font to Song style, but it is still garbled.
b. Modify the / ect/sysconfig/i18n content of the CentOS system 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= "latarcyrheb-sun16"
-the above content was found on the Internet and written according to it.
It is found that the connection ssh secure shell can display Chinese normally.
Looking at it with $locale, the configuration seen above has been changed to GB18030 coding.
But when you connect with putty, it becomes garbled again. I understand because putty still uses utf8 coding.
When configuring ssh secure shell, the CentOS system is changed to gb18030 coding, so the code is garbled.
c. To the server, restart the CentOS system, found that the display of Chinese is also normal.
3. If you find that there is a problem with ssh secure shell, or if it causes a problem, reconfigure putty to use
The configuration scheme can refer to the above configuration.
Conclusion:
Because the ssh secure shell window conforms to the window display, it is temporarily decided to use the ssh secure shell client.
And it is also bound with the ftp upload function, which is relatively convenient.
Change: consider setting up mysql and other places to use utf-8 coding, all still use putty client, and the system code is changed to utf-8
The above content is how to solve the problem of garbled codes in the client connection CentOS system. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.