How can a text file be converted from ANSI to UTF-8 with Delphi 7?

后端 未结 6 1918
渐次进展
渐次进展 2021-01-11 18:48

I written a program with Delphi 7 which searches *.srt files on a hard drive. This program lists the path and name of these files in a memo. Now I need convert

6条回答
  •  时光取名叫无心
    2021-01-11 19:17

    var
      Latin1Encoding: TEncoding;
    begin
      Latin1Encoding := TEncoding.GetEncoding(28591);
      try
           MyTStringList.SaveToFile('some file.txt', Latin1Encoding);
      finally
          Latin1Encoding.Free;
      end;
    end;
    

提交回复
热议问题