Encodes a message header that contains non-US-ASCII characters.
function EncodeHeader( const Header: string; const specials: String; const HeaderEncoding: Char; TransferHeader: TTransfer; MimeCharSet: string ): string;
Parameters |
Description |
Header |
Message header to be encoded. |
specials |
Special characters that require quoting. |
HeaderEncoding |
Content encoding for the message header. |
TransferHeader |
Transfer encoding for the message header. |
MimeCharSet |
MIME character set for the message header. |
String - Value of the encoded message header.
EncodeHeader is a String function that encodes a message header containing non-US-ASCII characters using the content encoding, transfer encoding, and character set specified in the input parameters.
Argument values are normally found in properties for a TIdMessage instance. These values are passed to EncodeHeader when the message instance generates its' header values during transmission.
Specials indicates any characters in additional to the non-printable US-ASCII characters that may require encoding.
MimeCharSet is the MIME character set, and is used with HeaderEncoding to construct the encoding marker that start and encoded sequence of characters. Encoded sequences are subject to line folding, and cannot exceed 75 characters. Sequences longer than 75 characters are folded by inserting a CRLF and TAB sequence.
HeaderEncoding can contain one of the following values and associated meanings:
Value |
Meaning |
B |
Base64 |
Q |
Quoted Printable |
8 |
8bit |
7 |
7bit |
When HeaderEncoding contains an empty string (''), the Base64 encoding value 'B' is assumed.
TransferHeader is used mainly to apply transfer encoding for Japanese character sets.
Use DecodeHeader to reverse the processing performed in the method.
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
|
Post feedback to the Indy Docs Newsgroup.
|