What if the Chinese garbled code occurs when linux accesses the ftp server
This article mainly introduces in detail how to do Chinese garbled when linux accesses the ftp server. The sample code in this article is very detailed and has certain reference value. Interested friends can refer to it.
Question:
There is a problem of garbled Chinese characters when accessing the windows ftp server under Linux.
Reason:
This is due to the problem of different Chinese coding. The Chinese encoding of Windows uses gbk, while the default encoding of most versions of linxu is utf8.
Related Learning Video sharing: linux Video tutorial
Solution:
Use lftp to log in at the terminal and manually set the Chinese coding mode.
First, enter in the terminal:
Lftp ftp://:@
After logging in, enter:
Set ftp:charset gbkset file:charset utf8
After that, the Chinese file name can be displayed normally. However, there may also be a problem when you try ls or cd after setting up:
Fatal error:Certificate verification:Not trusted
At this point, you need to enter the following command:
Set ssl:verify-certificate no
These are the details of what to do when linux accesses the ftp server in Chinese. Is there anything to gain after reading it? If you want to know more about it, welcome to the industry information!