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

comment characters embedded (quoted) in names or values #12

Open
gregnis opened this issue Aug 20, 2024 · 3 comments
Open

comment characters embedded (quoted) in names or values #12

gregnis opened this issue Aug 20, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@gregnis
Copy link

gregnis commented Aug 20, 2024

Example:

[Misc]
Show '# Of Diffs' column message=1

Result:

document [0, 0] - [3, 0]
  section [0, 0] - [1, 0]
    section_name [0, 0] - [1, 0]
      text [0, 1] - [0, 5]
  ERROR [1, 0] - [1, 6]
    setting_name [1, 0] - [1, 6]
  comment [1, 6] - [2, 0]
    text [1, 7] - [1, 34]
@gregnis gregnis changed the title Does not handle comment characters embedded in name or values Does not handle comment characters embedded in names or values Aug 20, 2024
@gregnis
Copy link
Author

gregnis commented Aug 21, 2024

You may ask whether it's legal, and I couldn't find any information on this. All I know is that I have them in my INI files, and that Windows GetPrivateProfileString() handles such key without problems.

@justinmk justinmk added the bug Something isn't working label Aug 29, 2024
@justinmk
Copy link
Owner

justinmk commented Aug 29, 2024

This conflicts with #13

Need a clear spec one way or the other. Else we're just fumbling around and will do unexpected things depending on the INI "flavor". A spec for each "flavor" would be a starting point.

'# Of Diffs' implies quote-parsing. What does Windows GetPrivateProfileString() do with the following?

[Misc]
Show '# Of Diffs column message=1
Show # Of Diffs' column message=2

@justinmk justinmk changed the title Does not handle comment characters embedded in names or values comment characters embedded in names or values Aug 29, 2024
@justinmk justinmk added enhancement New feature or request and removed bug Something isn't working labels Aug 29, 2024
@gregnis
Copy link
Author

gregnis commented Aug 29, 2024

'# Of Diffs' implies quote-parsing. What does Windows GetPrivateProfileString() do with the following?

[Misc]
Show '# Of Diffs column message=1
Show # Of Diffs' column message=2

It fails in both cases (uses the default value). Still, it does succeed and reads "1" for

[Misc]
Show '# Of Diffs' column message=1

and if you follow the recommendation of https://stackoverflow.com/a/19550081/152142 to use GetPrivateProfileString as a de facto reference, it would make sense to implement this.

@justinmk justinmk changed the title comment characters embedded in names or values comment characters embedded (quoted) in names or values Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants