Subject: Re: When is \n converted to \r\n? and why?
From: [email-masked] (Urban Widmark)

30 Oct 1998 23:08:15 -0800
Message-ID: <Pine.GSO.3.96.981030095603.963A-100000.cygnus.gnu-win32@fungus>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Larry Hall <[email-masked]>
Cc: [email-masked]

On Thu, 29 Oct 1998, Larry Hall wrote:

> 
> Nope.  Its not a tr or any other kind of bug.  You said it yourself above.
> Translation is done when writing to (and reading from) the disk.  How can
> tr be expected to remove something that doesn't exist.  Remember, text/
> binary modes have to do with how things are written to files on the disk,
> not how they are handled in stdin, stdout, pipes, and whatever.
> 

Which means writing the file to disk and then doing cat is not the same as
piping it directly. I think that is wrong.

Or is the \r removed when reading a \r\n file from disk with text mode? 
Is it always removed or does it depend on the program I use (eg cat
doesn't remove it, tr/wc does ...).

The amount of problems this will cause seems endless if I have to remember
which programs convert and which doesn't. Assuming it matters for the end
result, which it did in this case, the windows program wouldn't work if
the configuration files we tried to generate contained \r. A bug in that
software? definitely! But the cygwin behaviour is still confusing.

Btw, I don't have anything against \r\n, I just don't like when programs
convert things automagically when I haven't told them to do so ... I guess
it's a control thingy. :)

/Urban, unable to understand people who doesn't turn off autocorrection in
        word

---
Urban Widmark                           [email-masked]
Svenska Test AB                         +46 90 71 71 23

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".