Re: [X-Unix] Why didn't Apple change the line break ?

Craig craig at craigwdesigns.com
Tue Sep 21 05:09:51 PDT 2004


This may be unrelated, but why is it that on OS X, if you redirect the 
output of
ls or some other commands into a text file then open the file with a 
text editor,
you see something like this:

[01;34malias sketchbook examples
ls.txt
new pix
oreilly.com -- Online Catalog- PDF Hacks.webloc
wiretap.sit
zip code article-LVRJ.html
zip code map-LVRJ.gif


which should, & if you cat the file does, look like this:

alias sketchbook examples
ls.txt
new pix
oreilly.com -- Online Catalog- PDF Hacks.webloc
wiretap.sit
zip code article-LVRJ.html
zip code map-LVRJ.gif

thanks,
Craig

On Sep 21, 2004, at 1:52 AM, Eugene Lee wrote:

> On Mon, Sep 20, 2004 at 02:44:15PM -0400, Alexandre Quessy wrote:
> :
> : I am a web developer, and I am having problems with charcter 
> encoding,
> : and especially line breaks on Mac OS X. I wonder why Apple didn't
> : change the line break to the UNIX standard instead of keeping the 
> same
> : old one. Anyone have an idea ?
>
> Apple did, partially.  Traditional Unix command-line tools and all 
> Cocoa
> apps use LF for EOL.  Old Mac OS apps (i.e. Classic and Carbon apps) 
> use
> CR for EOL.  Nowadays, most editors are smart enough to detect 
> different
> EOL characters and provide the ability to convert between text formats.
> If the editor cannot do this, it sucks.




More information about the X-Unix mailing list