In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article "Linux how to solve Chinese garbled code", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "Linux how to solve Chinese garbled code" article.
Check the English environment of the system code as follows:
[root@localhost ~] # locale LANG=en_US.UTF-8 LC_CTYPE= "en_US.UTF-8" LC_NUMERIC= "en_US.UTF-8" LC_TIME= "en_US.UTF-8" LC_COLLATE= "en_US.UTF-8" LC_MONETARY= "en_US.UTF-8" LC_MESSAGES= "en_US.UTF-8" LC_PAPER= "en_US.UTF-8" LC_NAME= "en_US.UTF-8" LC_ADDRESS= "en_US.UTF 8 "LC_TELEPHONE=" en_US.UTF-8 "LC_MEASUREMENT=" en_US.UTF-8 "LC_IDENTIFICATION=" en_US.UTF-8 "LC_ALL= 123456789101112131415 Chinese environment is as follows:
[root@localhost ~] # locale LANG=zh_CN.GB2312 LC_CTYPE= "zh_CN.GB2312" LC_NUMERIC= "zh_CN.GB2312" LC_TIME= "zh_CN.GB2312" LC_COLLATE= "zh_CN.GB2312" LC_MONETARY= "zh_CN.GB2312" LC_MESSAGES= "zh_CN.GB2312" LC_PAPER= "zh_CN.GB2312" LC_NAME= "zh_CN.GB2312" LC_ADDRESS= "zh_CN.GB2312" LC_TELEPHONE= "zh_CN.GB2312" LC_MEASUREMENT= "zh_CN .GB2312 "LC_IDENTIFICATION=" zh_CN.GB2312 "LC_ALL= 123456789101112131415 check if the Chinese language pack is installed
[root@localhost ~] # rpm-qa | grep chinese ibus-table-chinese-erbi-1.4.6-1.el6.noarch ibus-table-chinese-wubi-haifeng-1.4.6-1.el6.noarch ibus-table-chinese-1.4.6-1.el6.noarch ibus-table-chinese-wubi-jidian-1.4.6-1.el6.noarch ibus-table-chinese-cangjie-1.4.6-1.el6.noarch ibus-table-chinese-scj-1.4. 6-1.el6.noarch 1234567 is installed with a Chinese language environment as above If not, please install the Chinese language pack
Install Chinese language Pack
Yum-y groupinstall chinese-support 1 modifies the system code to support Chinese
Method 1: modify / etc/sysconfig/i18n
[root@localhost ~] # vim / etc/sysconfig/i18n LANG= "zh_CN.UTF-8" [root@localhost ~] # source / etc/sysconfig/i18n # check the system code again It is found that the Chinese code [root@localhost ~] # locale LANG=zh_CN.UTF-8 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= 1234567891011121314151617181920 method 2: modify the environment variable file / etc/profile
# add the declaration of path variable to the environment variable file of the system, which will work on the whole system [root@xqsj-beta ~] # vim / etc/profile. LC_ALL= "zh_CN.UTF-8" export LANG= "zh_CN.UTF-8" [root@localhost ~] # source / etc/profile [root@localhost ~] # locale 1234567 Chinese edited under Windows and displayed as garbled under Linux. To solve this problem, you need to change the default encoding of Linux to GBK.
[root@localhost ~] # vim / etc/sysconfig/i18n LANG= "zh_CN.GBK" SUPPORTED= "zh_CN.UTF-8:zh_CN:zh" SYSFONT= "latarcyrheb-sun16" [root@localhost ~] # source / etc/sysconfig/i18n [root@localhost ~] # locale is related to the article "how to solve Chinese garbled in Linux". I believe everyone has a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about it, please 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.