Tuesday, December 4, 2007

Binary and ASCII transfers

Binary transfers is for binary files, such as executable, graphic or compressed files. ASCII transfers is for text files, such as HTML documents and pure ASCII text (such as notepad files). If you use WS-FTP or CuteFTP as your FTP program, check the AUTO box at the bottom of the program screen to have the software try and determine what method to use automatically. If you transfer Binary files using ASCII transfer method, you will corrupt your files on the server, making them unreadable. If you transfer ASCII files using Binary transfer method you will alter the formatting of the text contained in the file itself. This doesn't seem like such a big deal, until you try to open this file again. Strange things will happen, such as all the carriage returns being stripped out, or if the uploaded HTML or text file needs to be opened by a UNIX-based text editor such as VI or PICO, the user will see a ^M at the end of each line, very ugly and difficult to read.

No comments: