How to solve the garbled problem after SecureCRT connects to Linux server

  
                

In Linux, users sometimes encounter garbled characters after SecureCRT connects to the Linux server. So how do we solve this problem? In fact, the method is not difficult, let's take a look at it with Xiaobian.

Question: Chinese became garbled characters appear (the current system is encoded as UTF-8, CRT encoded as UTF-8)

principle: keep the file system, CRT three The encoding format is the same.

Solution:

Method 1:

a. View the encoding format of the file

You can view the file directly in Vim. Encoding

:set fileencoding

fileencoding=latin1

Viewing file encodings using commands

# file Mysql2.txt

Mysql2.txt : ISO-8859 text, with CRLF line terminators

ISO-8859 Also known as Latin or "Western European language"

b, check the format of the encoding used by the Linux system, the system will Edit to en_US (if you see the file edited as UTF-8 or GBK, etc., you can change it to UTF-8 or GBK, etc.)

# LANG=en_US

# echo $LANG

en_US

c. Modify and modify the settings of Secure CRT (if you see the file edited as UTF-8 or GBK, etc. Change to UTF-8 or GBK, etc.)

Right-click – select the properties of the session to view, modify to default Previous 12 Next page Total 2 pages

Copyright © Windows knowledge All Rights Reserved