Chinese garbled characters when linux accesses ftp server

王林
Release: 2020-02-15 16:37:52
Original
6156 people have browsed it

Chinese garbled characters when linux accesses ftp server

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://:@
Copy after login

After logging in, enter:

set ftp:charset gbk
set file:charset utf8
Copy after login

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
Copy after login

At this time, you need to enter the following command:

set ssl:verify-certificate no
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!