[Smaug] CR/LF, wordwrap, newline & ASCII

Rick Moen rick at linuxmafia.com
Fri, 14 Jun 2002 21:53:13 -0700

Quoting Paul Thomas (paul@cuenet.com):

> However the text instead of breaking, is a continuous line of text, with
> the CR character ^M appearing where the end of lines _should_ be. But
> instead of moving to a new line, there is are about 4 whitespaces, then
> the text continues.

The "continuous line of text" bit should no longer be mysterious to
you, one hopes.  Pico and less found no control characters it classified
as valid endline signals, therefore they did not display line breaks.
The control character they _did_ see repeatedly was Carriage Return
(ASCII #13), which they decided to indicate with the conventional 
symbolic way of saying "Control M".

> No, I have only been talking about _end of lines_, not paragraphs.

Well, -=now=- you clarify that.

> Well that is what I'm trying to determine, that these hard-breaks
> are inserted by the Mac Eudora, or, if my GNU text pagers/editors
> are sticking them in there. 

I hope you meant to say _were_ trying to determine, since I've already
explained why it had to be some piece of MacOS editing software that
did that.

> In the case of a long line, maybe my pager(s) count 80 characters and
> insert a CR.

Why the _hell_ would it do that?  CR is not conventionally used as an
endline character on Unix, and your text-pager would be far more likely
to either softwrap the text or let it hang off to the right, depending
on its configuration.

> But in the case of a short line like the 'author' example above, I
> don't know how my pager might discern that is the place to stick a CR.

I cannot conceive of a reason why a text pager would insert _anything_.
To do so would violate the definition of "pager".

You do know the difference between a pager and an editor, right?  A 
pager displays a file's contents without altering it.

Cheers,   The difference between common sense and paranoia is that common sense
Rick Moen     is thinking everyone is out to get you.  That's normal; they are.
rick@linuxmafia.com      Paranoia is thinking they're conspiring.  -- J. Kegler