FTP predominately provides two transfer modes: ASCII and BINARY.
ASCII mode is generally intended for text-based content and that BINARY mode is generally intended for transferring content as-is, although transferring text-based content in BINARY mode is often perfectly safe.
ASCII mode is required for transferred CGI scripts to execute correctly - a CGI script transferred in BINARY mode will often result in an HTTP 500 upon execution.
Are there any other types of content that are known to require transfer by ASCII mode? What content will 'break' when transferred in BINARY mode that would not 'break' when transferred in ASCII mode?
Binary mode will work for any data.
The problem with CGI scripts is that they are often edited on Windows with CRLF line endings, and the servers expect the line endings to be just LF. ASCII mode solves this. But modern servers don't care about this anymore, and also you can convert line endings on the server side if you have right tools, and also you can tell the editor on the client side to use LF as a line ending if you need to (at least Notepad++ seems to do this).
I never saw charset conversion taking place in ASCII mode, just because ASCII is a charset.
Update: ASCII mode can be used to convert data between EBCDIC and ASCII when connecting to mainframes. In this case binary mode would require manual conversion after transfer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With