We are all well known that text files are binary files where every set of 8 ones and zeros neatly convert into one character. This is almost perfectly true. Text files are more than what you see. If text files were only text, each file would be one long line of text. In fact, at the end of each line in a text file is at least one character
Indicating this is where a line ends.

PCs use two characters: carriage return (CR) and line feed (LF). Macs use only CR and UNIX uses only LF. What a pain! Indeed it is, but when you FTP your files, your FTP client can take care of this for you. If you tell your FTP client (or let it guess) your file is a text file, then it automatically makes the proper adjustments to the end of the lines to correct for the file’s new platform. If you tell your FTP client your text file is actually binary, then it leaves the whole file alone. This means when you open your file on the new platform, the line ends won’t be right.

What if you upload your binary file as text? Disaster. The FTP client has conveniently gone through your file and changed every string of 8 ones and zeros that translate into an LF or CR and tried to convert them as if they were text. You won’t recognize your file and neither will a browser.

If you are working on either a Mac or a PC and your Web server is UNIX, or if you are working on UNIX or a Mac and your Web server is Windows NT, then try this experiment: upload a text file (any old HTML file will do) to your Web server as text and then download it as binary. Your end of file characters will be wrong because
you didn’t let the FTP client fix it on the way back down.