Home>Article>Operation and Maintenance> Chinese garbled characters when linux accesses ftp server

Chinese garbled characters when linux accesses ftp server

王林
王林 Original
2020-02-15 16:37:52 6278browse

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://:@

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!

Statement:
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 admin@php.cn