|
@@ -1368,7 +1368,7 @@ begin
|
|
try
|
|
try
|
|
MakeInt(ResPtr^, 1);
|
|
MakeInt(ResPtr^, 1);
|
|
if not DoAppend and (CodePage = CP_UTF8) then
|
|
if not DoAppend and (CodePage = CP_UTF8) then
|
|
- Write(F, #$FEFF); //UTF8 BOM as a single Unicode character
|
|
|
|
|
|
+ Write(F, #$FEFF); //Strings are UTF-16 so this UTF-16 BOM will actually be saved as an UTF-8 BOM
|
|
Write(F, Get(1).AsStr);
|
|
Write(F, Get(1).AsStr);
|
|
finally
|
|
finally
|
|
CloseFile(F);
|
|
CloseFile(F);
|