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

value following quoted string are skipped #72

Open
touilleMan opened this issue Apr 8, 2016 · 3 comments
Open

value following quoted string are skipped #72

touilleMan opened this issue Apr 8, 2016 · 3 comments

Comments

@touilleMan
Copy link
Collaborator

Given the .ini

[main]
key = "hello" world

Iniparser will stop reading after the first double quoted string so we will end up with
key=hello instead of key=hello world

I'm not sure if it's a bug or an "undocumented feature" (a line should not contain more than a single quoted string) but in such case we should display a syntax error instead of just dropping information

@dobragab
Copy link
Contributor

dobragab commented Apr 9, 2016

I checked Winapi: GetPrivateProfileString ends up with "hello" world, and I think that is the desired value.

key = "hello" returns hello, I think it checks quotes only at first and last character. I believe the only library iniparser should be consistent to is Winapi.

@touilleMan
Copy link
Collaborator Author

So it's an "undocumented feature" then ;-)

I agree to keep it this way to be consistent to Winapi, but maybe we could add a word about this in doc/iniparser.main

@lmoellendorf
Copy link
Collaborator

@dobragab wrote

I checked Winapi: GetPrivateProfileString ends up with "hello" world, and I think that is the desired value.

So iniparser's behavior is not consistent to Winapi.

key = "hello" returns hello, I think it checks quotes only at first and last character.

Interestingly Winapi removes quotes if they are first AND last character of value. But both quotes are kept if only one is first character.

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

No branches or pull requests

3 participants