EncodeWord method: MCFMailUtil class
Syntax
EncodeWord(WordToEncode, charset, EncodingStyle, &EncodedWord)
Description
Use the EncodeWord method to encode a word. If you want to encode more than a single word, use the EncodeText method.
The encoded word is placed in the &EncodedWord parameter.
This method returns true if successful. If the return value is false, the following MCFMailUtil properties are set accordingly:
-
ErrorDescription
-
ErrorDetails
-
ErrorMsgParamsCount
-
MessageNumber
-
MessageSetNumber
In addition you can use the GetErrorMsgParam method to return each of the substitution strings used to format the error message.
Parameters
| Parameter | Description |
|---|---|
|
WordToEncode |
Specify the word that is to be encoded, as a string. |
|
charset |
Specify the character set to be used for encoding the word, as a string. See Global Technology: Character Sets Across the Tiers of the PeopleSoft Architecture. |
|
EncodingStyle |
Specify the encoding style. Valid values are:
|
|
&EncodedWord |
Specify a string variable, used to hold the encoded word. |
Returns
A Boolean value: true if successful, false otherwise.
Using Encoding Styles
You can specify either “B” or “Q” for the EncodingStyle parameter, indicating either Base64 or “Quoted-Printable” content-transfer-encoding, respectively.
PeopleSoft recommends using the “Q” encoding when most of the characters to be encoded are in the ASCII character set; otherwise, you should use the “B” encoding. However, a mail reader that claims to recognize encoded text must be able to accept either encoding for any character set that it supports.
Both Base64 and “Quoted-Printable” content-transfer-encoding are defined by RCF 1521. See RCF 1521: Base64 Content-Transfer-Encoding and Quoted-Printable Content-Transfer-Encoding.
Related Topics