Subject: Re: ASCII and BINARY files. Why?
From: [email-masked] (Fergus Henderson)

2 Feb 1997 06:19:41 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Content-Type: text
Original-To: [email-masked] (Francis Litterio)
Original-Cc: [email-masked] (gnu-win32)
In-Reply-To: <[email-masked]> from "Francis Litterio" at Jan 31, 97 10:27:49 pm
X-Mailer: ELM [version 2.4 PL24]
Original-Sender: [email-masked]

Francis Litterio, you wrote:
> 
> Michael Paul Smith <[email-masked]> wrote:
> 
> > The ASCII or BINARY thing is no big deal in practice.
> 
> Then you've probably never done any of these things under UNIX:
> 
> 1.  Used cat to aggregate a partitioned gzip file:
> 
> 	cat file.gz.1 file.gz.2 file.gz.3 | gunzip -c > file

That one is indeed a serious problem.

> 2.  Used sed to change the names of symbols in an object file:
> 
> 	sed 's;read;rEaD;g' < foo.o > newfoo.o

You shouldn't do this anyway!  It's a hack that might happen to work,
if you're lucky, but you shouldn't complain if it breaks.

> 3.  Or even just tried to see a hex or octal dump of what's
>     in a file that doesn't contain text:
> 
> 	od foo.gz

That one could be fixed without too much difficulty by changing
"od" to open the file in binary mode.

Problem "1" is a much stronger argument for always using binary
mode than problems "2" or "3".

-- 
Fergus Henderson <[email-masked]>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger [email-masked]         |     -- the last words of T. S. Garp.
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".