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 (implemented by interface IEncodings)
Count
| IDL | [propget] HRESULT Count([out, retval] long* pValue) |
|---|---|
| .NET | Int32 Count[get] |
| VB6 | Count As Long |
The number of encodings the collection.
The property is read-only.
Default
| IDL | [propget] HRESULT Default([out, retval] IEncoding** pValue) |
|---|---|
| .NET | Encoding Default[get] |
| VB6 | Default As Encoding |
The default encoding used by Merge to open/save files.
The property is read-only.
Item
| IDL | [propget] HRESULT Item([in] long nIndex, [out, retval] IFileSystemItem** pValue) |
|---|---|
| .NET | IFileSystemItem get_Item(Int32 nIndex) |
| VB6 | Item(nIndex As Long) As IFileSystemItem |
Provides access to the encoding at the specified index within the collection.
The property is read-only.
Arguments
-
nIndex
The index of an encoding within the collection.
Methods (implemented by interface IEncodings)
CreateEncoding
| IDL | HRESULT CreateEncoding([in] long codepage, [in] VARIANT_BOOL usesByteOrderMarker, [out, retval] IEncoding** pValue) |
|---|---|
| .NET | Encoding CreateEncoding(Int32 codepage, Boolean usesByteOrderMarker) |
| VB6 | CreateEncoding(codepage As Long, usesByteOrderMarker As Boolean) As Encoding |
Creates an encoding object representing a Windows codepage.
Arguments
-
codepage
The Windows codepage 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.
CreateUCS2Encoding
| IDL | HRESULT CreateUCS2Encoding([in] VARIANT_BOOL usesByteOrderMarker, [in] VARIANT_BOOL littleEndian, [out, retval] IEncoding** pValue) |
|---|---|
| .NET | Encoding CreateUCS2Encoding(Boolean usesByteOrderMarker, Boolean littleEndian) |
| VB6 | CreateUCS2Encoding(usesByteOrderMarker As Boolean, littleEndian As Boolean) As Encoding |
Creates an encoding object representing the UCS-2 character encoding.
Arguments
-
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.
CreateUTF8Encoding
| IDL | HRESULT CreateUTF8Encoding([in] VARIANT_BOOL usesByteOrderMarker, [out, retval] IEncoding** pValue) |
|---|---|
| .NET | Encoding CreateUTF8Encoding(Boolean usesByteOrderMarker) |
| VB6 | CreateUTF8Encoding(usesByteOrderMarker As Boolean) As Encoding |
Creates an encoding object representing the UTF-8 character encoding.
Arguments
-
usesByteOrderMarker
Specifies that the encoding object should emit a byte order marker at the start of files saved using this encoding.
| Related topics |
|---|
