The following are the identifiers of common codes. How can they be obtained in Delphi (2009?
UNICODE:
FF fe ; Bigendianunicode:
Fe FF ; Utf8:
EF BB BF
var BS: tbytes; B: byte; STR: string; begin {only Unicode, bigendianunicode, and utf8 are supported.} BS: = tencoding. unicode. getpreamble; STR: = ''; for B in BS do STR: = format ('% S % x', [STR, B]); showmessage (STR ); {FF fe} BS: = tencoding. bigendianunicode. getpreamble; STR: = ''; for B in BS do STR: = format ('% S % x', [STR, B]); showmessage (STR ); {Fe ff} BS: = tencoding. utf8.getpreamble; STR: = ''; for B in BS do STR: = format ('% S % x', [STR, B]); showmessage (STR ); {ef bb bf} {ASCII, utf7, and default (default encoding) No identifier} BS: = tencoding. ASCII. getpreamble; STR: = ''; for B in BS do STR: = format ('% S % x', [STR, B]); showmessage (STR ); {none} BS: = tencoding. utf7.getpreamble; STR: = ''; for B in BS do STR: = format ('% S % x', [STR, B]); showmessage (STR ); {none} BS: = tencoding. default. getpreamble; STR: = ''; for B in BS do STR: = format ('% S % x', [STR, B]); showmessage (STR ); {none} end;