Charset Property (ADO)

Microsoft ActiveX Data Objects (ADO)

Charset Property

       

Indicates the character set into which the contents of a text Stream should be translated.

Settings and Return Values

Sets or returns a String value that specifies the character set into which the contents of the Stream will be translated. The default value is "Unicode". Allowed values are typical strings passed over the interface as Internet character set strings (for example, "iso-8859-1", "Windows-1252", etc.). For a list of the character set strings that is known by a system, see the subkeys of HKEY_CLASSES_ROOT\MIME\Database\Charset in the Windows Registry.

Remarks

In a text Stream object, text data is stored as Unicode. The Charset property translates the data read from the Stream into the specified character set. Similarly, data written to the Stream in the specified character set is translated into Unicode for storage in the Stream object.

For an open Stream, the current Position must be at the beginning of the Stream (0) to be able to set Charset.

Charset is used only with text Stream objects (Type is adTypeText). This property is ignored if Type is adTypeBinary.