Upload files on ftp, garbled in Chinese

use the ftp package of nodejs to upload a pdf file containing Chinese to the server, and the open file is garbled.

c.put(filepath, dir + day + "/" + fileName, function (err) {
            console.log("upload err", err);
            // if(!err){
            //   fs.unlinkSync("./../uploads/" + fileName)//
            // }
            c.end();
          });

clipboard.png

is there any way to deal with it?

Apr.17,2021

it's not garbled, it's missing fonts! FTP is just a transport protocol and will not modify the contents of your file.


this is because the encoding corresponding to the configuration of your uploaded file does not match the encoding of the uploaded file, or the encoding of the file opened by FTP's editor does not match the encoding of the file. Just set it to use utf8 uniformly

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37dac-2c0e3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37dac-2c0e3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?