Переглянути джерело

* fix encoding on save, patch from Ondrej, mantis #33121

git-svn-id: trunk@38105 -
marco 7 роки тому
батько
коміт
79ebe68e8b
1 змінених файлів з 2 додано та 5 видалено
  1. 2 5
      packages/fcl-base/src/inifiles.pp

+ 2 - 5
packages/fcl-base/src/inifiles.pp

@@ -1340,15 +1340,12 @@ begin
       If D <> '' Then
         if not ForceDirectories(D) then
           Raise EInoutError.CreateFmt(SErrCouldNotCreatePath,[D]);
-      if FEncoding=nil then
-        slLines.SaveToFile(FFileName)
-      else
-        slLines.SaveToFile(FFileName, FEncoding);
+      slLines.SaveToFile(FFileName, FEncoding);
       end
     else if FStream <> nil then
       begin
       Fstream.Size:=0;
-      slLines.SaveToStream(FStream);
+      slLines.SaveToStream(FStream, FEncoding);
       end;
     FillSectionList(slLines);
     FDirty := false;