Re: strings and strings (was Don't get it.)
Re: strings and strings (was Don't get it.)
- Subject: Re: strings and strings (was Don't get it.)
- From: Christopher Nebel <email@hidden>
- Date: Tue, 19 Dec 2006 18:18:45 -0800
At 11:40 AM +0100 12/14/06, Peter Waibel wrote:
I've forgotten the details, but IIRC a string can contain 'pure'
characters,
or also additional formatting information. ...
Somewhere I found the handler "AsText".
As far as I know this handler is from Arthur Knapp.
on AsText(str)
--coerce Unicode or other text to styled string to plain text
try
return (((str as string) as record)'s «class ktxt»)
end try
return str -- if plain text to begin with
end AsText
The result of AsText is a pure 8 bit string.
I should point out that you really shouldn't have to use this trick.
We consider software that requires it to have a bug which should be
corrected. If you know of any offenders [1], please let us know who
they are.
--Chris Nebel
AppleScript Engineering
[1] That includes any Apple products, but make sure you're running
Tiger -- we fixed several from Panther. _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden