Re: Choose file/folder unicode allergy
Re: Choose file/folder unicode allergy
- Subject: Re: Choose file/folder unicode allergy
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 12 Sep 2002 22:18:06 -0700
On 9/12/02 9:24 PM, "Steven Angier" <email@hidden> wrote:
>
Is there a way to coerce a unicode string back into into plain text? Nothing
>
I try seems to work:
Arthur Knapp has been telling us all about this for months:
set styledText to unicodeText as string
set styleRecord to styledText as record
set plainText to <<class ktxt>> of styleRecord
or, very neatly in a handler Arthur posted recently:
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
set plainText to AsText(someText)
--
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.