• 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: kai <email@hidden>
  • Date: Mon, 4 Apr 2005 02:32:13 +0100


On Mon, 4 Apr 2005 09:17:39 +0800, bill wrote:

The subject line says "Mac vs Unix" but I wonder if AppleScript's paragraph elements are agnostic to the two other Unicode line endings? which are neither DOS, nor Unix, nor Mac. I have not seen them in practice but. . .

Doug,

The two other unicode line endings, are you talking about U+2028 (line separator) and U+2029 (paragraph separator)?

If yes, here's my testing:

paragraphs of (("Bonjour." as Unicode text) & return & "Comment allez-vous?")
paragraphs of (("Bonjour." as Unicode text) & («data utxt000D») & "Comment allez-vous?")


paragraphs of (("Bonjour." as Unicode text) & (ASCII character 10) & "Comment allez-vous?")
paragraphs of (("Bonjour." as Unicode text) & («data utxt000A») & "Comment allez-vous?")


paragraphs of (("Bonjour." as Unicode text) & («data utxt2029») & "Comment allez-vous?")
-- {"Bonjour.", "Comment allez-vous?"}



All the above five testings return the same result. However, for U+2028, the result is different:


paragraphs of (("Bonjour." as Unicode text) & («data utxt2028») & "Comment allez-vous?")
-- {"Bonjour. Comment allez-vous?"}


Do you have any idea why applescript treats these two line endings differently?


I believe utxt2029 represents a paragraph separator, while utxt2028 is a line separator. I guess that treating the latter as a full-blown paragraph separator would be a misrepresentation.

---
kai
_______________________________________________
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


  • Prev by Date: Re: Mac vs unix Carriage returns on a text file format
  • Next by Date: Re: Mac vs unix Carriage returns on a text file format
  • Previous by thread: Re: Mac vs unix Carriage returns on a text file format
  • Next by thread: Run Apple Script
  • Index(es):
    • Date
    • Thread