ini icon indicating copy to clipboard operation
ini copied to clipboard

Incorrect conversion of arrays to .ini format in Windows

Open xenohunter opened this issue 9 years ago • 1 comments

[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.

xenohunter avatar Apr 26 '16 10:04 xenohunter

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!

amjonas88 avatar Jan 31 '17 18:01 amjonas88

os-specific eol parsing has been fixed since this issue was opened

wraithgar avatar Apr 13 '23 17:04 wraithgar