System.SysUtils.TEncoding.GetEncoding
Delphi
class function GetEncoding(CodePage: Integer): TEncoding; overload; static;
class function GetEncoding(const EncodingName: string): TEncoding; overload; static;
C++
static TEncoding* __fastcall GetEncoding(int CodePage)/* overload */;
static TEncoding* __fastcall GetEncoding(const System::UnicodeString EncodingName)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | TEncoding |
Description
Returns the encoding used for the code page supplied.
TEncoding.GetEncoding returns the preferred encoding for CodePage.
CodePage must be a valid codepage identifier or one of the CP_XXX constants defined by the Windows API.
EncodingName is a character set name that is translated into the corresponding Windows code page. Only encoding names that Windows can map to a code page are supported. A TMBCSEncoding will be created and returned.