Create a Unicodestring and define that from the UTF8 string and then save the Unicodestring? Just a guess.
off the top of my head as a save procedure..
write a BOM at the start?in windows it would be LE but I guess there are ways to change that.
https://en.wikipedia.org/wiki/Byte_order_mark
Code: Pascal [Select][+][-]procedure TForm1.FormCreate(Sender: TObject);var sl: TStringList;begin sl := TStringList.Create; sl.Add('zażółć gęslą jaźń'); sl.Add('łąka'); sl.Add('Wiki: переводы статей'); sl.Add('جهة النّص وبعض المُصطلحات'); sl.SaveToFile('d:\stringlist_utf8.txt'); sl.SaveToFile('d:\stringlist_utf16be.txt', TEncoding.BigEndianUnicode); sl.SaveToFile('d:\stringlist_utf16le.txt', TEncoding.Unicode); sl.Free;end;
Try setting sl.WriiteBOM:=True and for linux sl.LineBreak:=#13;