stay Ubuntu Next visit to the school FTP Server time , Chinese folder display garbled code . This is due to the different coding ,Ubuntu In general use UTF-8, And the school server should be GBK, And now Firefox It's not supported FTP agreement , Unable to transfer file on Browser , So you can choose to operate under the terminal .
- install lftp command
sudo apt-get install lftp
- Connect to server , among username It's your user name on the server ,,password It's your code ,address It's the server address . Before connecting to the server , First, please cd Go to the directory where you want to upload files
lftp ftp://<username>:<password>@<address>
- After successful connection , Continue to enter the following command to set the encoding
set ftp:charset gbk
set file:charset utf8
- Generally speaking, the Chinese name can be displayed normally now . If the file cannot be processed cd or ls operation , Then continue to enter the following command to set
set ssl:verify-certificate no
- After you can access the folder normally , Use put Order to upload your files . here put You can upload files directly from your local directory
put yourfile
Reference resources