The FTP control channel is line oriented and the ftp library writes command arguments (paths) straight onto it without escaping, so a filename containing CR/LF can inject an independent FTP command. This fix makes sure CR/LF are therefore always encoded to safe symbols regardless of the configured encoding, which is what the default encoding already does.