Declaration¶
Source position: sysencodingh.inc line 124
type
TMBCSEncoding = class(TEncoding)
public
constructor Create; overload;
constructor Create(ACodePage: Integer); overload;
constructor Create(ACodePage: Integer; MBToWCharFlags: Integer;
WCharToMBFlags: Integer); overload;
function Clone : TEncoding;
function GetMaxByteCount : Integer;
function GetMaxCharCount : Integer;
function GetPreamble : TBytes;
end;
Inheritance¶
Description¶
TMBCSEncoding is the encoding class used for most of the encodings, except the actual Unicode encodings. The codepage is specified during creation, and is by default the system codepage.
The name is somewhat misleading, since the MBCS is also used for single-byte encodings.
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Clone | public | Clone a TMBCSEncoding instance. |
| Create | public | Create a new instance of a multi-byte character set encoding. |
| GetMaxByteCount | public | Return max number of bytes needed to represent a string. |
| GetMaxCharCount | public | Return max number of characters that can be represented by an array of bytes. |
| GetPreamble | public | Return BOM marker bytes. |
See also¶
| Name | Description |
|---|---|
| TUnicodeEncoding | UTF-16 Unicode encoding. |
| TUTF8Encoding | UTF-8 Unicode encoding. |
| TUTF7Encoding | UTF-7 Unicode encoding. |
| TBigendianUnicodeEncoding | Big-endian UTF-16 Unicode encoding. |