ini
ini copied to clipboard
Incorrect conversion of arrays to .ini format in Windows
[Section]
name[]=value_one
name[]=value_two
name[]=value_three
[Next section]
That is being parsed well, but then is being written to .ini file as:
[Section]
name[]=value_onename[]=value_twoname[]=value_three
[Next section]
Windows versions in which that behaviour was noticed are 7 and 10.
I think I have found the issue here, and fixed my version. When writing out an array, it is using "\n" to delimit each element, irrespective of OS.
I have fixed my version by changing Line 30 thus: out += safe(k + "[]") + separator + safe(item) + eol //"\n"
I don't think it affects re-reading the data in - but it does affect reading the ini file into other systems!
Mark PS. Not clever enough to get it back into the source repository!
os-specific eol parsing has been fixed since this issue was opened