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: 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