In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "how to look at the default coding format of linux". The editor shows you the operation process through an actual case. The method of operation is simple and fast, and it is practical. I hope that this article "how to look at the default coding format of linux" can help you solve the problem.
The default linux encoding is in "UTF-8" format, which can be viewed by executing the "locale" command in the terminal, and the result is "LANG=en_US.UTF-8". If you want to change the encoding format, you can use the vi command to open the i18n file, change the coding value of the "LANG" entry, and save the configuration.
The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
The default encoding for Windows is GBK,Linux, and the default encoding is UTF-8.
In Linux, we can view the linux system code through the locale command:
The language is en_US (American English) and the code is UTF-8
The locale command is used to set the locale in which the program runs.
Locale sets the naming convention for the locale to Language_area.charset, for example, en_US.utf8 indicates that the language is English, the region is the United States, and the character set is UTF-8.
Expand knowledge:
The Chinese edited under Windows is displayed as garbled under Linux. To solve this problem, change the default encoding of Linux to GBK.
So how do I change the linux default encoding? Here are several methods:
1. Modify / etc/sysconfig/i18n file manually
Vi / etc/sysconfig/i18n
You can set the default
LANG= "en_US.UTF-8" LANG= "zh_CN.GB18030"
Modified to:
LANG= "zh_CN.GBK" SUPPORTED= "zh_CN.UTF-8:zh_CN:zh"
2 、 vi / etc/profile
Export LC_ALL= "zh_CN.GBK" export LANG= "zh_CN.GBK"
Description: both methods should be saved after modification.
This is the end of the content about "what do you think of the default coding format of linux"? thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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.