Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binary - ASCII difference ?



On Sun, Jun 17, 2001 at 03:15:41PM -0700, man4u66@example.com wrote:
> hi everybody 
> i wanna learn what is the difference between Binary
> and ASCII mode ?  I faced them in gftp . 
> Does it matter which mode i use to download files ?
>  Thanks for attention....

As you may know, different operating systems use different codes to denote
the end of line in ASCII files ('\n', or ASCII code 10, for UNIX; '\r', or
ASCII code 13, for MacOS; and '\r\n', or ASCII code 13 followed by ASCII code
10, for DOS/Windows). The ASCII mode assumes that the file being transferred
is text, and translates end-of-line characters on the fly. The problem is that
this may irreparably corrupt the file if the file happens to be something
besides text.

If you are in doubt, it is always safer to use binary mode. At least you
are guaranteed to get the file intact.

-- 
Shimpei Yamashita                               http://www.shimpei.org/


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links