Encodings Object

This object represents a collection of character encoding objects that can be used when opening or saving text files. Convenience properties/methods are provided to enable easy creation of the most commonly used encodings.

Properties

Countread-onlyIEncodings

The number of encodings the collection.

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

Defaultread-onlyIEncodings

The default encoding used by Merge to open/save files.

IDL [propget] HRESULT Default([out, retval] IEncoding** pValue)
.NET Encoding Default[get]

Itemread-onlyIEncodings

Provides access to the encoding at the specified index within the collection.

IDL [propget] HRESULT Item(
    [in] long nIndex,
    [out, retval] IFileSystemItem** pValue)
.NET IFileSystemItem get_Item(
    Int32 nIndex)
  • nIndex
    The index of an encoding within the collection.

Methods

CreateEncodingIEncodings

Creates an encoding object representing a Windows code page.

IDL HRESULT CreateEncoding(
    [in] long codepage,
    [in] VARIANT_BOOL usesByteOrderMarker,
    [out, retval] IEncoding** pValue)
.NET Encoding CreateEncoding(
    Int32 codepage,
    Boolean usesByteOrderMarker)
  • codepage
    The Windows code page that the encoding should represent.
  • usesByteOrderMarker
    Specifies that the encoding object should emit a byte order marker at the start of files saved using this encoding.

CreateUCS2EncodingIEncodings

Creates an encoding object representing the UCS-2 character encoding.

IDL HRESULT CreateUCS2Encoding(
    [in] VARIANT_BOOL usesByteOrderMarker,
    [in] VARIANT_BOOL littleEndian,
    [out, retval] IEncoding** pValue)
.NET Encoding CreateUCS2Encoding(
    Boolean usesByteOrderMarker,
    Boolean littleEndian)
  • usesByteOrderMarker
    Specifies that the encoding object should emit a byte order marker at the start of files saved using this encoding.
  • littleEndian
    Specifies whether the encoding object represents little endian UCS-2.

CreateUTF8EncodingIEncodings

Creates an encoding object representing the UTF-8 character encoding.

IDL HRESULT CreateUTF8Encoding(
    [in] VARIANT_BOOL usesByteOrderMarker,
    [out, retval] IEncoding** pValue)
.NET Encoding CreateUTF8Encoding(
    Boolean usesByteOrderMarker)
  • usesByteOrderMarker
    Specifies that the encoding object should emit a byte order marker at the start of files saved using this encoding.