Problem:
When accessing the windows ftp server under Linux, the problem of Chinese garbled characters appears.
Cause:
This is due to different Chinese encoding issues. Windows Chinese encoding uses gbk, and the default encoding for 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 encoding method.
First enter in the terminal:
lftp ftp://<username>:<password>@<address>
After logging in, enter:
set ftp:charset gbk set file:charset utf8
Then the Chinese file name can be displayed normally. However, there may be a problem. After setting up, when trying ls or cd, it will appear:
Fatal error:Certificate verification:Not trusted
At this time, you need to enter the following command:
set ssl:verify-certificate no
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of Chinese garbled characters when linux accesses ftp server. For more information, please follow other related articles on the PHP Chinese website!