• 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: bill <email@hidden>
  • Date: Mon, 4 Apr 2005 09:17:39 +0800

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?



bill


_______________________________________________ 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: Doug McNutt <email@hidden>
  • Prev by Date: Re: Check if iTunes is playing?
  • 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: Re: Mac vs unix Carriage returns on a text file format
  • Index(es):
    • Date
    • Thread