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

Brandon Edward Bickford bran at cats.ucsc.edu
Fri, 14 Jun 2002 07:39:21 -0700 (PDT)


The text editor opening your program can do whatever it wants to.

The _convention_, however, is to display a line break whenever there is a
lf (mac), cr/lf (dos/windows/cpm), or cr (unix) in a textfile.  In the
basic case, the operating system/system library does nothing in most
cases (no magical conversion). 

I believe ^M is line feed, but i'm not sure.



On Thu, 13 Jun 2002, Paul Thomas wrote:

> 
> On Thu, 13 Jun 2002, Brandon Edward Bickford wrote:
> 
> > Since no one seemed to respond to this all that well, I believe the answer
> > to your question is kind of complicated by the fact that it's mostly up to
> > the programmer.  That is, at any point someone can put in a cr, cr/lf, or
> > lf into a file using the ascii character codes, and start any convention
> > they so desire.  
> 
> Right on. I guess what I'm trying to figure out is, if I open a 'plain
> text' file from someone else, does my OS insert the line breaks or do
> they come enclosed with the 'plain text' file. 
> 
> If it is a case of my OS (Linux) inserts these line breaks and I find
> them to be ^M characters, are these ^M characters artifacts of
> something else?
> 
> Thanks,
> 
> --Paul
> 
> --
> William J. Broad: "The crux... is that the vast majority of the mass
> of the universe seems to be missing."
> 
> 
> 

Brandon Bickford 
bran@cats.ucsc.edu