Encoding Object

This object represents an encoding that can be used when opening or saving text files. Encoding objects are created by the Encodings Object.



The Windows code page represented by the encoding. UCS-2LE is 1200, UCS2-BE is 1201, and EUC-JP is 51932.

IDL [propget] HRESULT Codepage([out, retval] long* pValue)
.NET Int32 Codepage[get]


Specifies whether the encoding object represents little endian UCS-2.

IDL [propget] HRESULT LittleEndian([out, retval] VARIANT_BOOL* pValue)
.NET Boolean LittleEndian[get]


A descriptive name for the encoding.

IDL [propget] HRESULT Name([out, retval] BSTR* pValue)
.NET String Name[get]


A persistable name for the encoding. This is used by the csDefaultEncoding string preference.

IDL [propget] HRESULT PersistentName([out, retval] BSTR* pValue)
.NET String PersistentName[get]


Specifies whether the encoding will write a byte order marker at the start of files saved using the encoding.

IDL [propget] HRESULT UsesByteOrderMarker([out, retval] VARIANT_BOOL* pValue)
.NET Boolean UsesByteOrderMarker[get]