Skip to end of metadata
Go to start of metadata

Delphi provides a straightforward way when saving text in TStringList in Unicode. Please see following example.

var
  myBatch:TStringList;
begin
  myBatch := TStringList.Create;
  myMatch.Items.Add('Hello, world!');
  myBatch.SaveToFile('d:\temp.txt',TEncoding.UTF8);
  myBatch.Destroy;
end;