When I save the object from TStringList class file content to a file, the file is saved with UTF-8 correctly but UTF-8 with BOM by default.
My code is:
myFile := TStringList.Create;
try
myFile.Text := myData;
myFile.saveToFile('myfile.dat', TEncoding.UTF8)
finally
FreeAndNil(myFile);
end;
In the example the file "myfile.dat" appear as "UTF-8 BOM" encoding.
How can I save the file without BOM?