Solve the problem of garbled Chinese characters when using CRT links in CentOS 7:
[Root @ hz/] # export LC_ALL = en_US.UTF-8
Ideas:
[Root @ hz/] # locale # default current language environment
LANG = en_US.UTF-8
LC_CTYPE = "C"
LC_NUMERIC = "C"
LC_TIME = "C"
LC_COLLATE = "C"
LC_MONETARY = "C"
LC_MESSAGES = "C"
LC_PAPER = "C"
LC_NAME = "C"
LC_ADDRESS = "C"
LC_TELEPHONE = "C"
LC_MEASUREMENT = "C"
LC_IDENTIFICATION = "C"
LC_ALL = C
[Root @ hz locales] # export LC_ALL = en_US.UTF-8 # LC_ALL it is a macro, if this value is set, it will overwrite the set values of all LC. Note that the LANG value is not affected by this macro. C "is the default locale of the system, and" POSIX "is the alias of" C. So when we install a new system, the default locale is C or POSIX.
[Root @ hz locales] # 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= en_US.UTF-8
[Root @ hz/] # locale-a | grep zh _*
Zh_CN
Zh_CN.gb18030
Zh_CN.gb2312
Zh_CN.gbk
Zh_CN.utf8
Zh_HK
Zh_HK.big5hkscs
Zh_HK.utf8
Zh_SG
Zh_SG.gb2312
Zh_SG.gbk
Zh_SG.utf8
Zh_TW
Zh_TW.big5
Zh_TW.euctw
Zh_TW.utf8