property WriteBOM: Boolean read FWriteBOM write FWriteBOM;
Whether a save writes the encoding's byte order mark first; True by default.
Returns: Boolean
Examples
No byte order mark.
uses Substr, System.SysUtils, System.Classes;
procedure Example;
var List: TSubstringList;
Stream: TBytesStream;
begin
List := TSubstringList.Create(2);
Stream := TBytesStream.Create;
try
List.Add('a');
List.WriteBOM := False;
List.SaveToStream(Stream, TEncoding.UTF8);
Assert(Stream.Size = 3);
finally
Stream.Free;
List.Free;
end;
end;