Re: CR and LF in AS 1.6
Re: CR and LF in AS 1.6
- Subject: Re: CR and LF in AS 1.6
- From: Chris Nebel <email@hidden>
- Date: Mon, 02 Apr 2001 00:45:03 -0700
- Organization: Apple Computer, Inc.
Paul Berkowitz wrote:
>
On 3/29/01 7:59 PM, "Shane Stanley" <email@hidden> wrote:
>
>
> I just ran a script that deals with text containing CR-LF paragraph endings.
>
> When it asked for "paragraphs of theText" it got a list with every second
>
> item empty -- it seems that both the CRs and LFs are being treated as
>
> paragraph endings.
>
>
>
> I don't remember this happening before -- is this something new with 1.6?
>
> Shouldn't CR-LF pairs be treated as a single entity in this case?
>
>
I think I read that from 1.5.5 AS could read both CR and LF as line endings
>
- presumably for Unix purposes. But you'd certainly think it would be aware
>
of the CRLF combo as a single unit.
You'd presume correctly on both counts, but there's a bug. (Dang!) Counting
paragraphs and getting individual ones (e.g. paragraph 42 of ...) does the right
thing with cr, lf, or crlf line endings, but getting a range of paragraphs (e.g.
paragraphs of ..., paragraphs 2 thru 17 of ...) messes up with crlf line endings.
--Chris Nebel
AppleScript Engineering