TUnicodeEncoding
[Properties (by Name)][Methods (by Name)][Events (by Name)]
UTF-16 Unicode encoding
Declaration
Source position: sysencodingh.inc line 159
Type
  TUnicodeEncoding = class (TEncoding)
  strict protected
    function GetByteCount(Chars: PUnicodeChar; CharCount: Integer) : Integer
                         ;  Override;  Overload;
    function GetBytes(Chars: PUnicodeChar; CharCount: Integer; 
                     Bytes: PByte; ByteCount: Integer) : Integer;  Override
                     ;  Overload;
    function GetCharCount(Bytes: PByte; ByteCount: Integer) : Integer
                         ;  Override;  Overload;
    function GetChars(Bytes: PByte; ByteCount: Integer; 
                     Chars: PUnicodeChar; CharCount: Integer) : Integer
                     ;  Override;  Overload;
    function GetAnsiBytes(Chars: PChar; CharCount: Integer) : TBytes
                         ;  Override;
    function GetAnsiString(Bytes: PByte; ByteCount: Integer) : string
                          ;  Override;
    function GetCodePage : Cardinal;  Override;
    function GetEncodingName : UnicodeString;  Override;
  public
    constructor Create;  Virtual;
    function Clone : TEncoding;  Override;
    function GetMaxByteCount(CharCount: Integer) : Integer;  Override;
    function GetMaxCharCount(ByteCount: Integer) : Integer;  Override;
    function GetPreamble : TBytes;  Override;
  end
  ;
Description
TUnicodeEncoding is the encoding class used to represent the UTF-16 encoding.
Members
| Member | Type | Visibility | Description | 
|---|---|---|---|
| Clone | Method | public | Clone a TUnicodeEncoding instance | 
| Create | Method | public | Create a new instance of the TUnicodeEncoding class | 
| GetAnsiBytes | Method | strict protected | |
| GetAnsiString | Method | strict protected | |
| GetByteCount | Method | strict protected | |
| GetBytes | Method | strict protected | |
| GetCharCount | Method | strict protected | |
| GetChars | Method | strict protected | |
| GetCodePage | Method | strict protected | |
| GetEncodingName | Method | strict protected | |
| GetMaxByteCount | Method | public | Return max number of bytes needed to represent a string | 
| GetMaxCharCount | Method | public | Return max number of characters that can be represented by an array of bytes | 
| GetPreamble | Method | public | Return BOM marker bytes | 
Inheritance
| Class | Description | 
|---|---|
| TUnicodeEncoding | UTF-16 Unicode encoding | 
See also
| Name | Description | 
|---|---|
| TBigendianUnicodeEncoding | Big-endian UTF-16 Unicode encoding | 
| TMBCSEncoding | Multi-Byte character set encoding | 
| TUnicodeEncoding | UTF-16 Unicode encoding | 
| TUTF7Encoding | UTF-7 Unicode encoding |