• 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: Unicode to plain text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode to plain text


  • Subject: Re: Unicode to plain text
  • From: "Arthur J. Knapp" <email@hidden>
  • Date: Fri, 20 Sep 2002 11:12:23 -0400

> Date: Thu, 19 Sep 2002 23:05:18 +0100
> From: John Delacour <email@hidden>
> Subject: Re: Unicode to plain text

>>> Does anyone know how to convert utxt to TEXT in plain AppleScript?

>>> set plain_text to +class ktxt; of (unicodeString as record)

> Unless, of course, it is _true_ Unicode text, in which case it will
> not be coerced to a record, since it needs to contain no style info.
> The style info is purely for the purposes of displaying in
> NON-Unicode fonts in NON-Unicode environments.

> One day the message is going to get through!

Oh, sorry. :(

> Try this:

> tell application "TextEdit"
> open {alias f}
> set uText to get paragraph 1 of document 1

Since I'm not in a non-Unicode environment, could someone tell me
what happens when you do this:

(uText as styled text as record)'s <<class ktxt>>


> class of uText --> Unicode text
> try
> uText as record
> on error e
> return {uText, e}

What is the error message? Does the unicode text appear as styled
text in the error?

Remember, the point of this exercise is not to display all Unicode
characters accurately in some other way. We simply want a way to
take more or less 7-bit ascii that is given to us in Unicode format
and convert it to plain text so we can send it to the applications
or environments that need it as plain text.


{ Arthur J. Knapp, of <http://www.STELLARViSIONs.com>
a r t h u r @ s t e l l a r v i s i o n s . c o m
}
_______________________________________________
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: Unicode to plain text
      • From: Malcolm Fitzgerald <email@hidden>
    • Re: Unicode to plain text
      • From: Paul Berkowitz <email@hidden>
    • Re: Unicode to plain text
      • From: Paul Berkowitz <email@hidden>
    • Re: Unicode to plain text
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Ready made OSAX or script for a lazy programmer
  • Next by Date: Re: Unicode to plain text
  • Previous by thread: Re: Unicode to plain text
  • Next by thread: Re: Unicode to plain text
  • Index(es):
    • Date
    • Thread