Weird characters downloading files from FTP

1

Since a while I experience problems downloading files from all FTP servers. This mainly concerns for example .css and .js files. When these files are downloaded, strange characters appear in the files, making them unusable.

I spoke to my hosting provider, he even watched, but he cannot reproduce the problem.

I work with a Windows 10 computer. Filezilla is the software that I work with. My IDE is Phpstorm.

Screenshot of relevant Filezilla settings

Example: https://prntscr.com/o8zg9f

The problem is probably due to a wrong character set, although I have not changed any settings. I also turned off my firewall, but that didn't help either.

Hopefully you can help me with new tips. If further information is needed, I would love to hear from you!

Sygun

Posted 2019-07-08T08:03:41.400

Reputation: 13

Do these files contain non-ASCII (non-latin) characters? – harrymc – 2019-07-08T08:43:03.677

https://dierennamengids.nl/beheer/assets/demo/default/base/style.bundle.css This is the original, working file. @harrymc – Sygun – 2019-07-08T08:53:38.843

I can't see any non-ASCII characters here. Strange. Try maybe to download the file in default transfer mode of Binary, rather than Auto. – harrymc – 2019-07-08T08:59:40.310

This worked for me, thanks. But the question is why this is suddenly neccessary? – Sygun – 2019-07-08T09:14:34.773

Answers

1

When FTP transfer causes strange characters, this almost always means a wrong transfer type.

The example file you gave seems to be in ASCII, but I have not checked all the characters.

Your transfer mode is Auto, which means that Filezilla decides automatically on the transfer mode. Evidently it made a wrong decision.

In such a case, it is better to force the Binary mode, so as to transfer the file as-is, no matter its encoding. The Binary mode is slower, but for small files such as .css and .js the difference in speed is minimal.

harrymc

Posted 2019-07-08T08:03:41.400

Reputation: 306 093