What are ASCII and BINARY modes?
ASCII is the standard method of exchanging information between the computers. It uses 7 bits in a standard byte and holds text.
BINARY is the number system based on number 2. It uses all 8 bits in a byte and can hold images along with text.
Why do we need to worry about transfering the files?
While uploading files from our computers to web sites, most of the times we are transfering the information between two different operating systems. Ex: Our Windows PC to Linux servers. So these different systems see the files at different angles especially at the end of the line and end of the document characters.
So if this part of the file is not transfered properly, you will get script errors like:
* 500 internal server error
* Premature end of script headers
* File is corrupted error
* Incomplete file transfers etc.
Knowing which file is which.
ASCII: As a rule of thumb, all the files that you CAN open in a Notepad needs ASCII mode transfer.
Examples:
* .txt (with no unicode like international language characters)
* .html
* .htm
* .shtml
* .php
* .js
* .cgi
* .pl
* .xml
* .rtf
* .asp
EXCEPTION TO THIS RULE: Microsoft word docuements (.doc) should be uploaded in BINARY.
BINARY: All the files that you CAN NOT open in a Notepad needs BINARY mode transfer.
Examples:
* .txt (with unicode)
* .doc
* .jpg
* .gif
* .png
* .jpeg
* .bmp
* .exe
* .pdf
* .dll
* .zip
How to set up your ftp software?
The example shown here is for WS_FTP PRO software. But all ftp software have these options. You need to look into your software userguide to see where these options are located.
1. Open up your WS_FTP PRO.
2. Highlight the website name on left side.
3. Click on 'Edit' button right side > 'Startup' tab > You will see the options.

ASCII mode: Uploads all files in ASCII mode
BINARY mode: Uploads all files in BINARY mode
AUTO: Automatic selection of mode based on your ftp software settings

4. Go to 'Options' > 'Extentions' tab > you will be able to add the file extentions there which are uploaded in ASCII by your software. If you do lot of uploading, then it will be better to tell your software which files you need to upload in ASCII.