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

Paul Thomas paul at cuenet.com
Thu, 13 Jun 2002 18:47:30 -0700 (PDT)


On Thu, 13 Jun 2002, Rick Moen wrote:

> > Especialy when you're dealing with a text editor.  A newline can be
> > the OS default, or it can be an editor specific meaning.
> 
> Oh, gimme a break.  Now, you're introducing macros.

Well maybe a context would be more helpful. I got into this cause
some Mac-based person zipped up some 'plain text' files with Stuffit
and sent them to me as an attachment. Apparently the origin of the
'plain text' files were emails the guy received with his Mac version
of Eudora, and he saved them as 'plain text' files.

So I unzipped this mess easily enough, but when trying to read the
text files with 'less' or 'pico', the text all ran together and
were end of lines had a ^M character followed by a space or perhaps
even a tab space, sometimes two ^M characters like: ^M^M. I was able
to:

strings some.txt > some.fixed.txt

and then read the file successfully formatted as it should have been
without the ^M characters visible.

When I reported this to the sender, he replied that I must be using
some old text reader from the 70's.

What think?

Thanks,

--Paul

--
William J. Broad: "The crux... is that the vast majority of the mass
of the universe seems to be missing."