Skip to content

TEncoding.GetEncoding

Get an encoding instance for a given codepage.

Declaration

Source position: sysencodingh.inc line 96

public 
class function GetEncoding(CodePage: Integer) : TEncoding;  overload
                          ;  static; overload;

class function GetEncoding(const EncodingName: UnicodeString)
                           : TEncoding;  overload;  static; overload;

Description

GetEncoding will return an instance of TEncoding for the given codepage CodePage. The codepage can also be specified by name EncodingName. The returned instance is an appropriate descendent of TEncoding and needs to be freed by the caller.

See also

Name Description
TUnicodeEncoding UTF-16 Unicode encoding.
TBigEndianUnicodeEncoding Big-endian UTF-16 Unicode encoding.
TUTF8Encoding UTF-8 Unicode encoding.
TUTF7Encoding UTF-7 Unicode encoding.
TMBCSEncoding Multi-Byte character set encoding.