ASCII mode FTP (was RE: Fw: error)

Kenneth Brody kenbrody at bestweb.net
Fri Jan 12 07:23:01 PST 2007


Quoting Bob Rasmussen (Thu, 11 Jan 2007 17:41:25 -0800 (PST)):

> I haven't been paying full attention, as I was distracted by 103-inch
> TVs at CES! So please pardon me if I stumble...

I was just reading about them in yesterday's paper.  Are they as
shiny as they sound?

> I believe the question is: what is the nature of "ASCII mode" file
> transfer, in Anzio and elsewhere?
>
> Usually this means dealing with different line-ends; line-feed on Unix
> and return/line-feed on Windows.
>
> LONG AGO it might have meant stripping a control-Z from the end of a DOS
> file while converting it to a Unix file. But seriously, folks, ctrl-Z as
> end-of-file has not been used since DOS 1.0, if I recall correctly! So
> Anzio doesn't do anything about it.

I believe that it came down to them using xtod to convert the file
into DOS/Windows format, and xtod was the one that added the ctrl-Z.
At that point, they did a binary transfer, since the file was already
converted.

My question was why they didn't simply take the Unix-formatted file
and allow ftp's ASCII mode do the conversion for them.


As for Ctrl-Z, believe it or not, Windows itself still treats that
as an EOF in text mode.  Try copying a PCL file to a printer using
the "copy filename lpt1" format, and the file will be truncated at
the first Ctrl-Z it encounters.  You need "copy /b filename lpt1"
to use binary mode.  Create a text file with a Ctrl-Z in it, and
then "type filename".  It stops at the ctrl-Z.  And so on.  On the
other hand, none of the current Windows programs _creates_ a text
file with Ctrl-Z at the end, AFAIK.

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list