Re: Unicode to plain text
Re: Unicode to plain text
- Subject: Re: Unicode to plain text
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 18 Sep 2002 14:04:26 -0700
On 9/18/02 12:02 PM, "Jon Pugh" <email@hidden> wrote:
>
So I've been bashing my head on CodeWarrior too much. I'm running 10.2.
>
>
do shell script returns Unicode, class utxt.
>
>
CodeWarrior wants plain text to insert into its windows, class TEXT.
>
>
I cannot find a way to coerce utxt to TEXT, aside from feeding it to ACME
>
Replace, which works for me, but not for others without this great scripting
>
addition.
>
>
Does anyone know how to convert utxt to TEXT in plain AppleScript? I'm
>
beginning to doubt that there's a way.
Is utxt the same as 'as Unicode text'? Arthur has shown us many times that
this works with Unicode:
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
Or are you getting that raw data stuff we used to get for utxt back in OS
8.5?
--
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.