[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Encoding support.
Source position: sysencodingh.inc line 21
type TEncoding = class |
||
public |
||
function Clone; virtual; |
|
Clone a TEncoding instance. |
class function Convert(); |
|
Convert an array of bytes from one encoding to another. |
class function IsStandardEncoding(); |
|
Check if the encoding is one of the standard encodings. |
class function GetBufferEncoding(); |
|
Attempt to guess the encoding of a buffer. |
class function GetEncoding(); |
|
Get an encoding instance for a given codepage. |
function GetMaxByteCount(); virtual; abstract; |
|
Returns the maximum number of bytes needed to represent a string. |
function GetMaxCharCount(); virtual; abstract; |
|
Return the maximum number of characters that can be represented in a number of bytes. |
function GetPreamble; virtual; abstract; |
|
Return the BOM Marker used by the encoding. |
function GetString(); |
|
Return a string based on an array of bytes. |
|
Codepage for this encoding. |
|
property EncodingName: UnicodeString; [r] |
|
Name of this encoding. |
property IsSingleByte: Boolean; [r] |
|
Is the encoding a single-byte encoding or not ? |
|
Ansi encoding instance. |
|
|
ASCII encoding instance. |
|
property BigEndianUnicode: TEncoding; [r] |
|
Big-endian Unicode (UTF16BE) encoding instance. |
|
Default codepage. |
|
property SystemEncoding: TEncoding; [r] |
|
System encoding. |
|
UTF16 encoding instance. |
|
|
UTF7 encoding instance. |
|
|
UTF8 encoding instance. |
|
end; |
|
Encoding support. |
|
| | ||
|
Base class of all classes. |
TEncoding is a mostly abstract class that contains various methods to deal with different encodings in single- and double-byte strings. In practice, one instance of a descendent of this class for each needed encoding can be instantiated and used. The class contains several class methods and properties to create such instances, and has several often-used instances available as class properties, in particular the default encoding.
When using encodings (and in particular TEncoding.Default or TEncoding.ANSI), if the DefaultSystemCodePage changes, you should call TEncoding.FreeEncodings to regenerate the encodings.
|
Ansi encoding instance. |
|
|
ASCII encoding instance. |
|
|
Default codepage. |
|
|
Big-endian Unicode (UTF16BE) encoding instance. |
|
|
UTF16 encoding instance. |
|
|
UTF7 encoding instance. |
|
|
UTF8 encoding instance. |