本文整理自网络,侵删。
procedure TForm1.Button1Click(Sender: TObject);var Outfile: TextFile;begin AssignFile(Outfile, 'test_chinese.txt', CP_UTF8); Rewrite(Outfile);
//This is the UTF-8 BOM Write(Outfile, #$FEFF);
Writeln(Outfile, '总结'); Writeln(Outfile, '°C'); CloseFile(Outfile);end;
相关阅读 >>
更多相关阅读请进入《Delphi》频道 >>