Inifiles does not support new lines correctly.
Original Reporter info from Mantis: payl
-
Reporter name: Paul W
Original Reporter info from Mantis: payl
- Reporter name: Paul W
Description:
If TIniFile.WriteString has value with new line, it is supported correct upon save, but next time ini file is loaded, it has errors in it (elements after new line will be doubled into new keys).
Tested on Lazarus 1.0.14 (Product version doesn't let me choose this).
Steps to reproduce:
Run program from "additional information" twice. After first run, everything is as expected, but after second run, data contain errors (empty key with value a2).
Additional information:
Sample code to reproduce:
program Project1;
{$mode objfpc}{$H+}
uses IniFiles;
var
ini:TIniFile;
begin
ini:=TIniFile.Create('temp.ini');
ini.WriteString('a','b','a1'+LineEnding+'a2');
ini.WriteString('a','c','sth');
ini.Free;
end.
Mantis conversion info:
- Mantis ID: 25444
- Fixed in version: 3.0.0
- Fixed in revision: 1069 (#cdd5b61a)
- Target version: 2.6.4