[Macpartners] What is the Mac OS X "standard" line ending?
Albert Willis
awillis at MIT.EDU
Wed Oct 26 14:25:42 EDT 2005
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/macpartners/attachments/20051026/4009ea2c/attachment.htm
More information about the Macpartners
mailing list