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

Case Sensitivity on row[string] #111

Closed
Dreamwalker666 opened this issue Mar 14, 2024 · 5 comments · Fixed by #113
Closed

Case Sensitivity on row[string] #111

Dreamwalker666 opened this issue Mar 14, 2024 · 5 comments · Fixed by #113
Assignees

Comments

@Dreamwalker666
Copy link

Hi, @nietras

Been trying out the library and love it brilliant work.

One issue I have had was case of CSV file headers not matching the case when referencing the row key.

This isn't an issue on my test data but the files come from an external source and they can easily use the wrong case. So would it be possible to have an option to match case insensitive for the lookup?

@nietras
Copy link
Owner

nietras commented Mar 14, 2024

Had been thinking about adding an option in SepReaderOptions for specifying StringComparer used in header dictionary, still have to check impact on rest of code. How does that sound?

Dreamwalker666 pushed a commit to Dreamwalker666/Sep that referenced this issue Mar 18, 2024
@Dreamwalker666
Copy link
Author

I have done a little investigation and pushed a branch with a working change.

One problem I did have I couldn't find a way to test SepHeader.Parse directly as using Sep.New() I couldn't see a way to set the reader options?

@nietras
Copy link
Owner

nietras commented Mar 20, 2024

It sounded like I was not clearly defining what I meant to change, I've created a work-in-progress PR for adding the relevant option in #113. I need to add tests, though.

@Dreamwalker666
Copy link
Author

Ah right got you.

I knew the change wouldn't be accurate I did, as I don't know the code base at all. I just wanted to do a little investigation work to help out. Passing it in does make more sense and why I had an issue trying to test it.

nietras added a commit that referenced this issue Mar 28, 2024
@nietras
Copy link
Owner

nietras commented Mar 28, 2024

0.4.5 should be available on nuget, thanks for filling the issue.

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.

2 participants