Xshell is a very good tool for embedded development. However, it may be a bit uncomfortable to see Chinese characters as garbled characters. The solution is actually very simple, that is, to change the xshell encoding method to UTF-8.
[File]-> [open]-> In the Open Session select the connection that, click [properties]-> [terminal], encoding: Unicode (UTF-8 ), then you can reconnect to the server. You can also click the "encoding" button in the toolbar of xshell and select Unicode (UTF-8) encoding.
When Vim is used, Chinese characters are garbled. In this case, we can modify the vimrc file to solve the problem!
First, you need to find out where vimrc is located. In general, in Linux
Linux:/usr/share/Vim/vimrc
In Windows, it should be in the vim installation directory
Windows: C: \ Program Files \ Vim \ vimrc I am currently using windows7, the path is displayed
C: \ Program Files \ Vim \ _ vimrc
This is all about global settings. After opening the vimrc file, you only need to add the following code at the end of the file:
Set fileencodings = UTF-8, gb2312, GBK, gb18030
Set termencoding = UTF-8
Set fileformats = Unix
Set encoding = PRC
In this way, your vim Chinese garbled problem is solved!
Garbled characters After Vim is opened, and garbled characters After xshell is opened