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/03 Report--
How to solve the problem of garbled code in linux terminal? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Terminal tools are generally the default utf-8 encoding format. If the terminal sets utf-8 or garbled code, the problem is that there is a problem with the Linux encoding format.
Set the Linux encoding format
Add the following code to .vimrc (create a new one without .vimrc)
Vim / .vimrcset encoding=utf-8 fileencodings=ucs-bom,utf-8,cp936
(1) execute the locale command to view the system language
# localeLANG=CLC_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=
(2) set the system environment variable LANG to en_US.UTF-8:
Export.UTF-8
Or edit the file: vim / etc/sysconfig/i18n
After reading this article, can you solve the problem of garbled code in linux terminal independently? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel. Thank you for reading.
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.