I tried various ways, but none of them worked.
(Like adding a 2nd parameter to SaveToFile or settting TStringList.DefaultEncoding / TStringList.Encoding.)
So how do I set the encoding for TStringList SaveToFile, so I can save in specific ANSI/UTF-8 formats?
Text in editor before I copy it to TStringList and save it using SaveToFile:
Code: Select all
.test {
content: "bøllehår";
}
Code: Select all
.test {
content: "b�lleh�r";
}
Doesn't matter if the content in editor is ANSI or UTF-8. Both produces the same buggy result.