• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Mac vs unix Carriage returns on a text file format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Mac vs unix Carriage returns on a text file format
      • From: "Dennis W. Manasco" <email@hidden>
References: 
 >Re: Mac vs unix Carriage returns on a text file format (From: bill <email@hidden>)
 >Re: Mac vs unix Carriage returns on a text file format (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: Mac vs unix Carriage returns on a text file format
  • Next by Date: Re: pdf reader, scriptable? If not now, then when?
  • Previous by thread: Re: Mac vs unix Carriage returns on a text file format
  • Next by thread: Re: Mac vs unix Carriage returns on a text file format
  • Index(es):
    • Date
    • Thread