Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.misc Subject: Re: what does ascii ftp do to a binary file? Message-ID: <1990Dec7.085559.1537@Think.COM> Date: 7 Dec 90 08:55:59 GMT References: <1990Dec6.194811.7643@nntp-server.caltech.edu> Sender: news@Think.COM Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 24 When a file is sent in ascii mode, whatever character sequence represents line end in text files on the sending system will be tranformed to carriage return (13) followed by line feed (10) during transmission. In addition, any carriage returns in the original file (if they aren't part of the line end sequence) will be transformed to carriage return followed by null (0). The receiving system will tranform any CR followed by LF into its representation of a line end, and CR followed by NUL into CR. If the two systems run the same operating system these two transformations should be perfect inverses (except for the case described below). If not, irreversible transformations may occur. Finally, if either of the systems normally stores text files using some code other than ASCII (e.g. if one of the systems is an IBM mainframe, most of which use EBCDIC), it will translate between its native character code and ASCII. Since different character code sets may support different characters, some characters may get lost in the translation. -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar