Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Enthusiast Zone > Classic Macs and Mac OS > newlines in mac text file

newlines in mac text file
Thread Tools
Dedicated MacNNer
Join Date: Dec 2000
Location: sj ca
Status: Offline
Reply With Quote
Feb 28, 2002, 01:52 AM
For a truly joyful experience, try using unix on NT (cygwin or variants). NT will "helpfully" translate <LF> to <CR><LF> for you (or vice versa), but maybe not if the file seems binary.

So why does seek() not always work right? Cause NT changed the length of the file without telling! Woohoo!

Not that anyone here cares about that, but just so we can appreciate what we have...
Fresh-Faced Recruit
Join Date: Oct 2000
Location: Colorado
Status: Offline
Reply With Quote
Feb 28, 2002, 04:36 AM
hey so unix, windblows and mac use different things for new lines. any one know what the mac uses?

I know in binary the mac uses \cM for \n and \cJ for \r
but what about text?
Sword of Orion
Forum Regular
Join Date: Jan 2002
Location: Texas
Status: Offline
Reply With Quote
Feb 28, 2002, 11:39 AM
The Mac uses <CR> in text files for EOL in OS 9 and earlier. Since OS X is based on UNIX, it uses <LF>, just like traditional UNIX does. And of course DOS uses <CR><LF> for EOL. Everybody just has to be different... That's why I prefer using an editor like BBEdit that can convert between the 3 formats.
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Privacy Policy
All times are GMT -4. The time now is 08:33 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,