[Macpartners] What is the Mac OS X "standard" line ending?

Atticus Gifford atticus at MIT.EDU
Wed Oct 26 14:35:37 EDT 2005


Just to clarify, carriage-return is the old (Pre-OS X) line ending  
character.  Many apps including TextEdit recognize both  
transparently, but all the UNIX command line tools will only  
recognize the linefeed.  Generally, linefeed is the way to go as I  
suspect any apps that use Carbon or Cocoa Text facilities inherit  
this functionality.

-atticus

On Oct 26, 2005, at 2:25 PM, Albert Willis wrote:

> On Oct 26, 2005, at 11:50 AM, David M Rosenberg wrote:
>
>> Is there a clear direction in which Apple is heading with respect to
>> line endings in text files?
>>
>> I know that some programs can deal with either Mac OS 9 line endings
>> (a single Carriage-Return character), Unix line endings (a single
>> Line-Feed character), or DOS line endings (a Carriage-Return +
>> Line-Feed pair). I also know that other programs give you the option
>> of generating files with the user's choice of line endings.
>>
>> My question is: What does Apple consider to the "standard" line
>> endings to be used in a text file written by a Mac OS X program in a
>> circumstance where you can't ask the user to choose?
>>
>> I would be especially appreciative to have a pointer to an official
>> Apple statement to the effect that: "In Mac OS X the 'standard line
>> ending' is ...."
>>
>> -- 
>> /David M Rosenberg         <rosenberg at mit.edu>         1-617-253-8054
>> MIT / IS&T / Admin Computing / Technical Services
>
> To my knowledge, Apple has not declared a standard line ending for  
> Mac OS X.
>
> I suspect the unofficial standard is the single line feed (LF)  
> character; since Mac OS X is a Unix-based operating system, that  
> shouldn't be a surprise. The text editors that ship with Mac OS X  
> (emacs, pico, vi, TextEdit) all use the single LF character for  
> line endings in text files.
>
> Any text files that are generated by the operating system have LF  
> as the line ending, so that appears to be the answer.
>
>   -- Al
>
>
> ______________________________
> Albert Willis
> Macintosh Platform Coordinator - Software Release Team
> Information Services and Technology
> Massachusetts Institute of Technology
> awillis at mit.edu
>
>
> _______________________________________________
> Macpartners mailing list
> Macpartners at mit.edu
> http://mailman.mit.edu/mailman/listinfo/macpartners
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/macpartners/attachments/20051026/aeaf834e/attachment.htm


More information about the Macpartners mailing list