Today, Xshell is used to connect to CentOS6.5, when the terminal code is set to: Unicode (UTF-8), the output of the command to execute service iptables restart will be garbled; when the encoding is set to: default language, ls output will be garbled!
Garbled issues such:
The output result of executing the locale command is as follows:
LANG = duration = "duration" LC_NUMERIC = "duration" LC_TIME = "duration" LC_COLLATE = "duration" LC_MONETARY = "duration" LC_MESSAGES = "zh_CN.GB18030" LC_PAPER = "duration" LC_NAME =" zh_CN.GB18030 "LC_ADDRESS =" zh_CN.GB18030 "LC_TELEPHONE =" zh_CN.GB18030 "LC_MEASUREMENT =" zh_CN.GB18030 "LC_IDENTIFICATION =" zh_CN.GB18030 "LC_ALL =
Then find the corresponding encoding in Xshell, and the result does not match. Try several similar results:
Since the language codes at both ends are inconsistent and the corresponding Code cannot be found in Xshell, modify the system!
Run the command: vi/etc/sysconfig/i18n
# LANG = "zh_CN.UTF-8"
After the modification, save and set the encoding to Unicode (UTF-8), run the command to test the output, OK, garbled problem solved.