Re: [Exim] Decode Subject header with special characters

Góra strony
Delete this message
Reply to this message
Autor: Matthew Byng-Maddick
Data:  
Dla: exim-users
Temat: Re: [Exim] Decode Subject header with special characters
On Wed, Sep 11, 2002 at 06:25:19PM +0200, Guenter Riess wrote:
> Are there some tools to decode this kind of header within a shell-script?
> I looked at recode without success.
> Or does somebody know how to decode it?
| =?iso-8859-1?b?5MT21vzc3w==?=

  ^ ^^^^^^^^^^ ^ ^^^^^^^^^^^^ ^
  a b          c d            e


You'll notice it's 5 fields separated by '?'

a and e are the initiator and terminator, respectively. They indicate that
it's a MIME encoded header.

b indicates the character encoding of the result.
c indicates the content transfer encoding, in this case, base64
d is the data, which in this case appears to be: äÄöÖüÜß

I used
perl -MMIME::Base64, with a small script to decode this subject.

MBM

--
Matthew Byng-Maddick         <mbm@???>           http://colondot.net/