Encoding Property  
 

Gets and sets the current encoding method used by the control.

Syntax

object.Encoding [= value ]

Remarks

The Encoding property determines how the specified file will be encoded or decoded by the control. The following encoding methods are supported:

Value Constant Description
0 fileEncodeDefault Use the default encoding method. Currently this is the same specifying that the base64 algorithm should be used for encoding and decoding files.
1 fileEncodeBase64 Use the base64 algorithm for encoding and decoding files. This is the standard method for encoding files as outlined in the Multipurpose Internet Mail Extensions (MIME) protocol. This is the method used by most modern email client software.
2 fileEncodeQuoted This encoding method is typically used for text messages that use characters beyond the standard ASCII character set, in the range of 128-255. This method, called quoted printable encoding, allows text messages to pass through mail systems that do not support characters with the high-bit set. Note that this method should not be used to encode binary files such as executables because the resulting output can be very large. For binary files, use the base64 algorithm instead.
3 fileEncodeUucode Use the uuencode and uudecode algorithms for encoding and decoding files. This is a common encoding method used with UNIX systems and older email client software.
4 fileEncodeYencode Use the yEnc algorithm for encoding the file. This is an encoding method that is commonly used when posting files to Usenet newsgroups.

The value of this property specifies the default encoding method for the DecodeFile and EncodeFile methods. Unless needed for a specific purpose, it is strongly recommended that binary files be encoded with the base64 algorithm for maximum compatibility. Note that it is not necessary to use this control to encode or decode file attachments with the Mail Message control, since it automatically handles encoding and decoding multipart messages.

The Encoding property also determines the encoding method that is used when the DecodedText and EncodedText properties are used to decode and encode text strings. The following values are supported:

Value Constant Description
0 dataEncodeDefault Use the default encoding method. Currently this is the same specifying that the base64 algorithm should be used for encoding and decoding data.
1 dataEncodeBase64 Use the base64 algorithm for encoding and decoding data. This is the standard method for encoding data as outlined in the Multipurpose Internet Mail Extensions (MIME) protocol. This is the method used by most modern email client software.
2 dataEncodeQuoted This encoding method is typically used for text messages that use characters beyond the standard ASCII character set, in the range of 128-255. This method, called quoted printable encoding, allows text messages to pass through mail systems that do not support characters with the high-bit set. Note that this method should not be used to encode binary data such as executables because the resulting output can be very large. For binary data, use the base64 algorithm instead.
3 dataEncodeURL This encoding method is used with Uniform Resource Locators (URLs) to convert certain reserved characters to ensure that the URL is processed correctly by a web server. Numbers and letters are unchanged; control characters, spaces, most punctuation and 8-bit characters are converted into their hexadecimal value.
4 dataEncodeUTF7 This encoding method converts Unicode text into 7-bit characters that can be safely passed through systems that do not support Unicode or 8-bit characters. This is most commonly used with email applications.
5 dataEncodeUTF8 This encoding method converts Unicode text into 8-bit characters that can be safely passed through systems that do not support Unicode.

Data Type

Integer (Int32)

See Also

DecodedText Property, EncodedText Property, DecodeFile Method, EncodeFile Method