On 10/26/01 8:18 AM, "Allen Watson" <[EMAIL PROTECTED]> wrote:

> On or near 10/25/01 9:26 PM, Dan Crevier at [EMAIL PROTECTED] observed:
> 
>> On 10/22/01 6:06 PM, "Bryan Harris" <[EMAIL PROTECTED]> wrote:
>> 
>>> Is there a way to convert an html message to plain text via AS?
>> 
>> Just do something like:
>> 
>> set the content of theMsg to the content of theMsg
> 
> Dan, that is so cool! Mind explaining why it works? I've been using a
> complex script written way back when (Emailer? OE?) by Phil Kearney, which
> parses all the multiple parts of the message, etc, and then (in OS 9) used
> TextSoap to strip the HTML code. And you do it in one line!

Well, the content property is just plain text, so getting it returns a plain
text version of the message.  When setting the content, it looses all the
formatting info since you are setting it to a simple text string.

Actually, a better version would be:

set the content of theMsg to (get the content of theMsg as unicode text)

This will preserve all of the Unicode characters.  Entourage returns 8-bit
text by default.

Dan


-- 
To unsubscribe:               <mailto:[EMAIL PROTECTED]>
To search the archives: 
          <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>

Reply via email to