Re: Wierd error
Re: Wierd error
- Subject: Re: Wierd error
- From: "Arthur J. Knapp" <email@hidden>
- Date: Wed, 24 Sep 2003 10:30:27 -0400
>
Date: Wed, 24 Sep 2003 06:17:20 +0100
>
Subject: Re: Wierd error
>
From: kai <email@hidden>
>
to trim(t)
>
set v to
>
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
>
set c to (count t) + 1
>
try
>
considering case
>
repeat with s from 1 to c
>
if t's item s is in v then exit repeat
Nice! :)
>
I believe John F's original problem may have something to do with a bug
>
associated with certain types of encoded text:
>
set text item delimiters to {""}
>
set t to "BLOW, JOE" as Unicode text
>
>
t's text items
>
>
--> {"", "", "L", "O", "W", ",", " ", "J", "O", "E"}
Yup, Kai's worked it out. This accounts for the log entries John Fowler
posted. Good stuff. :)
>
However, if the encoded string is coerced to plain text:
>
set text item delimiters to {""}
>
set t to "BLOW, JOE" as Unicode text
>
set {text:t} to t as string
Now, that looks familiar.... :)
>
t's text items
>
>
--> {"B", "L", "O", "W", ",", " ", "J", "O", "E"}
{ Arthur Knapp, of <
http://www.STELLARViSIONs.com>
a r t h u r @ s t e l l a r v i s i o n s . c o m
knowing someone your whole life and meeting them
for the first time at a wedding....
}
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.