You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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;
  • No labels