.
 

Why Us?
24/7 Monitoring

Scalable Network

Fast Hardware

Red Hat Linux

Control Panel

Satisfaction Guarantee

FAQ - Frequently Asked Questions

The difference between ASCII and BINARY

In short, html or text based files are supposed to be transferred in ASCII mode. Uploading them in Binary mode will append ^M's to the end of every line. In most cases, this is OK, with html files because your browser will ignore them. BUT, with other text files such as cgi scripts, uploading them in binary will damage them, thus causing a (server 500 error). This is because binary mode has added ^M's to the end of every line, which are not supposed to be in the program. This of course, is what causes the additional message of (Malformed Headers), which often displays at the bottom of the "Server 500" message when a CGI script has crashed.

Once again, BINARY mode is used for transferring executable programs, compressed files and all image/picture files. If you try to upload an image in ASCII mode, you observer a strange mess appearing on the page where the image is suppose to appear. ASCII mode in this case, has corrupted the binary coding in the jpeg or gif image. If this happens, just re-upload it in the Binary format

Related Topics:
Uploading your files in the correct mode (ASCII or Binary)
File Types and how they control the behavior of your files
FTP and FrontPage (What you should know)
Understanding case sensitivity
How come the files I've uploaded doesn't show up on my web site?
index.html and why you should use it
Setting your FTP client to automatically detect ASCII and Binary file transfers

Terms of Service
Copyright © 2001-2007 ServerPro. All Rights Reserved.
About Us Hosting Plans Resellers Support Frequently Asked Questions Resources Contact Us