Solve the problem of centos7's Chinese garbled code in SecureCRT
Read
To solve the problem of garbled Chinese characters when using CRT links in Centos7:
zero
[root@hz/]# export LC_ALL=en_US.UTF-8
Idea 1
zero
one
two
three
four
five
six
seven
eight
nine
ten
eleven
twelve
thirteen
fourteen
fifteen
sixteen
seventeen
eighteen
nineteen
twenty
twenty-one
twenty-two
twenty-three
twenty-four
twenty-five
twenty-six
twenty-seven
twenty-eight
twenty-nine
thirty
thirty-one
thirty-two
thirty-three
thirty-four
thirty-five
thirty-six
thirty-seven
thirty-eight
thirty-nine
forty
forty-one
forty-two
forty-three
forty-four
forty-five
forty-six
forty-seven
[root@hz/]#Locale # Default current locale
LANG=en_US.UTF-eight
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@hzlocales]#Export LC_ALL=en_US. UTF-8 # LC_ALL It is a macro. If this value is set, it will overwrite all LC_ * settings.Note that the value of LANG 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.
Because logs or other files are stored in the process, some unexpected bugs may cause the file content to be binary or other special charactersSourceByrd's Weblog-https://note.t4x.org/environment/config-lc-all-locale/
#It is generally suitable for copying from Windows to Linux, because the inconsistency between Linux and Windows on carriage returns, spaces, etc. can be generally solved in this way. The command unix2dos can be used from Linux to Windows
zero
[root@hzlocales]# dos2unix filename.txt
#If you use tools such as crt or xshell, the possible reason is that the character set of the tool itself is inconsistent with the character set of the system. You can useIdea 1Troubleshooting by
zero
[root@hzlocales]# export LC_ALL=en_US.UTF-8
#Problems caused by exceptions in the log storage processSourceByrd's Weblog-https://note.t4x.org/environment/config-lc-all-locale/
The error may be similar to Binary symbol 0x01 found at line 1. Such garbled code can generally be used to cut the file and delete the wrong line for repair.SourceByrd's Weblog-https://note.t4x.org/environment/config-lc-all-locale/
Similar documents:https://note.t4x.org/system/linux-i18n-config/SourceByrd's Weblog-https://note.t4x.org/environment/config-lc-all-locale/
Affirmation: This article is original by BYRD. Reprint is not allowed!SourceByrd's Weblog-https://note.t4x.org/environment/config-lc-all-locale/SourceByrd's Weblog-https://note.t4x.org/environment/config-lc-all-locale/
Statement: unless otherwise specifiedByrd's BlogThe content is original. Reproduction without permission is prohibited!For details, please readCopyright Statement!
@American TV ParadiseThe xshell is garbled. It should be a coding problem. You can select utf-8 locally.(Generally, the system and tool codes should be consistent.)