This situation usually occurs because the Chinese language pack is not installed or there is a problem with the default language setting. Enter If you really need Chinese prompts, you can install it like this: LANG=zh_TW.UTF-8 LC_CTYPE="zh_TW.UTF-8" LC_NUMERIC=zh_TW.UTF-8 LC_TIME=zh_TW.UTF-8 LC_COLLATE="zh_TW.UTF-8" LC_MONETARY=zh_TW.UTF-8 LC_MESSAGES="zh_TW.UTF-8" LC_PAPER=zh_TW.UTF-8 LC_NAME="zh_TW.UTF-8" LC_ADDRESS="zh_TW.UTF-8" LC_TELEPHONE="zh_TW.UTF-8" LC_MEASUREMENT=zh_TW.UTF-8 LC_IDENTIFICATION="zh_TW.UTF-8" LC_ALL= Note that my language environment is Taiwan Traditional Chinese, and the simplified Chinese language should be changed from TW to CN Appendix: Let's take a look at the solution to Chinese garbled characters in the shell script that displays utf-8 encoding format in centos Problem phenomenon The shell script I wrote was saved in utf-8 encoding format, but when uploaded to centos, it was displayed as garbled characters Use shell.sh: UTF-8 Unicode text Workaround Use iconv to convert the file encoding format to gb2312 iconv -f utf-8 -t gb2312 shell.sh > shell2.sh Run file shell2.sh again to view the file encoding linuxsec2.sh: ISO-8859 text The Chinese garbled characters problem has been solved This is the end of this article about the CentOS8-bash: garbled code problem. For more related centos bash garbled code content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! |
<<: Example analysis of the principle and solution of MySQL sliding order problem
>>: jQuery implements HTML element hiding and display
background We often use Chrome Dev Tools for deve...
Table of contents 1. Synchronization Principle 2....
Table of contents Download tf-gpu Build your own ...
Previous This is a classic old question. Since a ...
Overlay network analysis Built-in cross-host netw...
<frameset></frameset> is familiar to e...
Table of contents Arithmetic operators Abnormal s...
1. Virtual environment follows the project, creat...
Install mysql5.7 under win, for your reference, t...
Test the efficiency of deleting a large number of...
The query data in the xml price inquiry contains ...
This article uses an example to illustrate the us...
Table of contents 1. Overview 2. Routing Navigati...
SSH stands for Secure Shell, which is a secure tr...
Preface Before we begin, we should briefly unders...