EncodeText method: MCFMailUtil class
Syntax
EncodeText(TextToEncode, charset, EncodingStyle, &EncodedText)
Description
Use the EncodeText method to encode text. If you only want to encode a single word, use the EncodeWord method instead.
The encoded text is placed in the &EncodedText 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 |
|---|---|
|
TextToEncode |
Specify the text that is to be encoded, as a string. |
|
charset |
Specify the character set to be used for encoding the text, as a string. See Global Technology: Character Sets Across the Tiers of the PeopleSoft Architecture. |
|
EncodingStyle |
Specify the encoding style. Valid values are:
|
|
&EncodedText |
Specify a string variable used to hold the encoded text. |
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.
Oracle 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