From: fjh AT cs DOT mu DOT OZ DOT AU (Fergus Henderson) Subject: Re: ASCII and BINARY files. Why? 2 Feb 1997 06:59:48 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199702020613.RAA19354.cygnus.gnu-win32@mundook.cs.mu.OZ.AU> Content-Type: text Original-To: bfishman AT nirvanah DOT corp DOT es DOT com (Barry Fishman) Original-Cc: gnu-win32 AT cygnus DOT com (gnu-win32) In-Reply-To: <199701310237.TAA19218@nirvanah.corp.es.com> from "Barry Fishman" at Jan 30, 97 07:37:46 pm X-Mailer: ELM [version 2.4 PL24] Original-Sender: owner-gnu-win32 AT cygnus DOT com Barry Fishman wrote: > > Now back to the ASCII/BINARY discussion. I think we need to follow > the principle of least astonishment. When one opens a file and > sees ^M 's at the end of each line, you can tell right away what is > going on. You may be able to tell, but software can't. Consider, for example, the surprise you get when doing a `diff' on a gnu-win32 file after you've changed one line using a Windows editor. Consider, for example the suprises that this sort of problem will lead to when using tools like CVS. > What is difficult is having to spend hours patching each application to > to get around unexpected problems with seek addresses and files that > don't match their expected sizes. That is indeed difficult, but you must bear in mind that *whichever* approach we adopt, there will probably be some difficulties. We're just trying to find the minimum-difficulty approach. A zero-difficulty solution seems impossible. Not every application relies on file sizes or seek offsets being related to number of characters read. Most of those that do rely on this do it only for binary files, and so patching them is a simple matter of changing the calls to `fopen' or `open' to open the file in binary mode. The only ones that cause significant difficulty are those applications that rely on file sizes or seek offsets being related to number of characters read *for text files* (e.g. ~/.bash_history). I don't think there are many such applications, are there? -- Fergus Henderson | "I have always known that the pursuit WWW: | of excellence is a lethal habit" PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3 | -- the last words of T. S. Garp. - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".