Re: Stupid, Stupid Text Features [Was: Can't set creator type]
Re: Stupid, Stupid Text Features [Was: Can't set creator type]
- Subject: Re: Stupid, Stupid Text Features [Was: Can't set creator type]
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 24 Feb 2004 06:18:21 -0800
On 2/24/04 2:46 AM, "Mr Tea" <email@hidden> wrote:
>
And the data cannot by coerced into usable form with 'as text'
>
(Michelle Steiner's suggestion), 'as string', or by prepending '"" &'
>
to it. The correct method was suggested by Paul Berkowitz, and it
>
involves changing the first line to this...
>
>
set theCode to <<class ktxt>> of (text returned of dRes) as record
>
>
There. I said it was hairy. Paul is one of the most knowledgeable and
>
experienced contributors on this list, and it's his business to know
>
this kind of stuff, but what about the rest of us!!!???
It was Arthur Knapp who first brought this method to light, to my
recollection (although Jon Pugh may well have mentioned it before I knew
what was what). I just picked it up here on this list - it was discussed
many times.
>
>
If this kind of contortionism is required for such a simple procedure,
>
it suggests that AppleScript's text handling is all up the spout, and
>
makes a nonsense of this passage from Matt Neuberg's 'Definitive
>
Guide':
>
>
"Unicode text is basically indistinguishable from a string; the
>
differences between them are handled transparently. Whatever you can do
>
to a string, you can do to unicode text." (p 249)
For sure. I don't understand why it's taking them so long to come up with a
simple 'plain text' type or some other way to deal with this.
>
>
Aside from setting creator and file types, are there any other places
>
where this gotcha is likely to strike?
See previous post. I'm sure there are more places as well.
Until Panther, 'display dialog' not only didn't return Unicode but it
wouldn't accept it in the given string either. That was also a nuisance. It
might have been a good idea to get all string issues fixed at the same time
instead throwing people and scripts off.
--
Paul Berkowitz
_______________________________________________
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.