System.SysUtils.TUnicodeEncoding.GetPreamble
Delphi
function GetPreamble: TBytes; override;
C++
virtual System::DynamicArray<System::Byte> __fastcall GetPreamble();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | TUnicodeEncoding |
Description
Returns the UTF-16 preamble in a byte array.
In the TUnicodeEncoding class, GetPreamble returns the UTF-16 BOM (byte-order mark). GetPreamble returns a 2 byte array that represents the UTF-16 byte-order mark, which is later used to detect whether a given text is UTF-16 encoded.