Re: Mac vs unix Carriage returns on a text file format
Re: Mac vs unix Carriage returns on a text file format
- Subject: Re: Mac vs unix Carriage returns on a text file format
- From: Christopher Nebel <email@hidden>
- Date: Mon, 4 Apr 2005 15:42:27 -0700
On Apr 3, 2005, at 7:56 PM, Doug McNutt wrote:
The two other unicode line endings, are you talking about U+2028
(line separator) and U+2029 (paragraph separator)?
Do you have any idea why applescript treats these two line endings
differently?
<pureguess>
There is older lore about soft and hard returns which I think came
about with 5 inch floppies and real typewriters which didn't do
word wrapping very well.
Teletypewriters interpreted a line feed as solely vertical motion
and a return as solely horizontal. One needed both to get the
effect of the return bar of a typewriter. (One also needed nulls
for timing considerations and you could overwrite a line using a
return only.)
So. . .U+2028 (line separator) makes a new line that is not a new
paragraph.
</pureguess>
The distinction is also important for some text processing
applications. Notice, for instance, that Word lets you distinguish
between a line break and a paragraph break.
<lore class="apocryphal">
I was once told that the reason "carriage return" and "line feed"
were separate operations was for timing reasons, plus the fact that
sufficiently old TTYs didn't have any sort of buffer. It took a
while to move the print head back to the beginning of the line, so by
separating out the "line feed" part, they made the complete "move to
beginning of next line" operation take *two* characters worth of
time, which gave the print head time to make it back. This also
explains why it's carriage return then line feed, and not the other
way around.
</lore>
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden