Title: Re: Cannot print with full headers?
On or near 6/12/02 3:14 PM, Julian Vrieslander at [EMAIL PROTECTED] observed:

> "Quoted Printable" if I remember right.  Dan Crevier wrote an OSAX to strip
> out this stuff, which I have used with Claris Emailer and BBEdit under OS 9.
> The OSAX is available here:
>
> <http://www.boingo.org/dan/software/Programming.html>
>
> But I have not been able get this OSAX to work in OS X.

Quoted printable is really a very simple encoding, just the hex value of higher ASCII characters (>127). I wrote a quick AppleScript handler that will decode it, if you encounter it again:

on decodeQP(aString)
    set hexChars to "0123456789ABCDEF"
    set oldDelims to AppleScript's text item delimiters
    set AppleScript's text item delimiters to {"="}
    set workList to text items of aString
    set returnValue to ""
    set firstOne to true
    repeat with s in workList
        if firstOne then
            set firstOne to false
            set returnValue to s
        else
            if character 1 of s is return then set returnValue to returnValue & s
            try
                set decNum to 0
                set pair to characters 1 thru 2 of s
                if item 1 of pair is not in hexChars or item 2 of pair is not in hexChars then
                    set decNum to 0
                else
                    set decNum to ((offset of (item 1 of pair) in hexChars) - 1) * 16 + ((offset of (item 2 of pair) in hexChars) - 1)
                end if
                if decNum � 0 then set returnValue to returnValue & (ASCII character decNum) & text 3 thru -1 of s
            on error errMsg number errNum from errFrom partial result errResult to errTo
                -- on error code goes here
                display dialog errMsg & "Number:" & errNum
                return
            end try
            
        end if
    end repeat
    set AppleScript's text item delimiters to oldDelims
    return returnValue
end decodeQP

If you take the text you mentioned:

> I just did a View>Source and was able to print that window with no proble=
m
> ... in OS 9.1, Entourage 2001.
>=20
> Beth
>=20
>=20
> On 6/12/02 11:22 AM, "Julian Vrieslander" <[EMAIL PROTECTED]> wrote:
>=20
>> How do you print an incoming email message with all headers?
>>=20
>> Print command from the message window (with or without headers pane
>> expanded) gives only partial headers on the printed page.  Print command
>> from the View Source window does not work at all.
>>=20
>> I can copy/paste to another program and print from there.  But is there =
no
>> way to do it within Entourage?

--=20

And set a variable q to that string, you call the routine like:

 set newQ to my decodeQP(q)

the result will  be:

> I just did a View>Source and was able to print that window with no proble
m
> ... in OS 9.1, Entourage 2001.
>
> Beth
>
>
> On 6/12/02 11:22 AM, "Julian Vrieslander" <[EMAIL PROTECTED]> wrote:
>
>> How do you print an incoming email message with all headers?
>>
>> Print command from the message window (with or without headers pane
>> expanded) gives only partial headers on the printed page.  Print command
>> from the View Source window does not work at all.
>>
>> I can copy/paste to another program and print from there.  But is there
no
>> way to do it within Entourage?

It isn’t perfect. The word “problem” should all be on one line, so it isn’t handling the solitary “=” at the end of a line properly. But it works well enough.
--
My web page: <http://home.earthlink.net/~allenwatson/>
My scripts page: <http:homepage.mac.com/allenwatson>
Microsoft MVP for Mac Entourage/Word--<[EMAIL PROTECTED]>

Reply via email to