Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect conversion of arrays to .ini format in Windows #56

Closed
xenohunter opened this issue Apr 26, 2016 · 2 comments
Closed

Incorrect conversion of arrays to .ini format in Windows #56

xenohunter opened this issue Apr 26, 2016 · 2 comments

Comments

@xenohunter
Copy link

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

@amjonas88
Copy link

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!

@wraithgar
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants