• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Choose file/folder unicode allergy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Choose file/folder unicode allergy
      • From: Steven Angier <email@hidden>
References: 
 >Choose file/folder unicode allergy (From: Steven Angier <email@hidden>)

  • Prev by Date: Re: Display dialog frontmost?
  • Next by Date: Re: Display dialog frontmost?
  • Previous by thread: Choose file/folder unicode allergy
  • Next by thread: Re: Choose file/folder unicode allergy
  • Index(es):
    • Date
    • Thread