Internet Direct (Indy) Version 9.0.2 Beta
DecodeHeader
Decodes an RFC 822 message header with content and/or character set encoding.

function DecodeHeader(Header: string): string;
Parameters
Header: string
RFC message header to be decoded.

Returns
String - Value fopr the decoded messsage header.

Description
DecodeHeader is a String function that decodes the RFC 822-compliant message header, specified in Header, that has content transfer or character set encodings.

DecodeHeader checks Header for the ISO character set encoding marker ("=?ISO") to determine when character set encoding has been applied to Header. DecodeHeader also look fofr the content transfer encoding markers for Base64 ("?B") or Quoted-Printable ("?Q") encoding. DecodeHeader then decodes all encoded characters until the final "?=" marker is located.

DecodeHeader will remove any Null strings (Decimal 0) embedded in the message header.