This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: b20.1: binmode and pipes


Yayuck (yet another yuck).

As if my files were either 'text' (ISO-646 encoded, aka ASCII), or
'binary'. Counting the combination of MIME type and encoding, I've
propably got several hundred 'text' file formats on my system; the
simple 'text' type is next to useless.

And the idea of different 'native text file formats' depending on the OS
also ought to be history. My PC is running Windows NT 4.0 and I'm
maintaining a product targeted for both Wintel and Macintosh, using GNU
tools (e.g., make and sort). Three different conventions for record
separators in sequential access variable record length files (aka text
files). Why should my tools assume that I want a specific record
separator, just because I'm incidentally running on Windows NT, MacOS,
or Linux?

Earnie points out that applications should open files "+b" if that's
what they want, and not rely on any specific record separator. I agree
on that; this is somewhat similar to not assuming that sizeof(int) ==
sizeof(*char). To continue, you shouldn't assume that 'text characters'
occupy 1 byte each in the file.

So, my conclusion is to treat all files as 'binary', since I anyway need
to know a MIME type (e.g., 'text\sgml') and an encoding (e.g. 'UTF-8').
Forget about 'text' files. Also, do not use Notepad as a programming
editor.

Kind regards

Peter Ring

-----Original Message-----
From: John A. Turner [mailto:john.turner@pobox.com]
Sent: Tuesday, December 08, 1998 07:02
To: gnu-win32@cygnus.com
Subject: Re: b20.1: binmode and pipes


Corinna Vinschen wrote:

> Yes, do the binary mounts! They simplify your work more than
> you think!
> You only have to convert your shell scripts. This is easy
> by using sed, awk, perl, gsar, or vi.

Yuck.  I agree with Earnie Boyd and the FAQ on this point.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]