csvside
csvside copied to clipboard
support case-insensitive headers
Hi there
I notice when there is different cases on the headers, the parsing will fail.
For example replace
RowReaderFixtures.testReader
line
"Str".read[String],
with this line
"str".read[String],
and you will have 2 failing cases.
Probably needs some level of customisation or asume that the headers will have certain case.
Thanks for this. I reckon case insensitivity would be a more sensible default. If it’s configurable then all the better but I’d be happy to switch in a minor release. @d6y what do you think?
Dave
On Mon, 12 Nov 2018 at 17:09, Andrea [email protected] wrote:
Hi there
I notice when there is different cases on the headers, the parsing will fail. For example replace RowReaderFixtures.testReader line "Str".read[String], with this line "str".read[String],
and you will have 2 failing cases.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/underscoreio/csvside/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOI5yyZTsZzRSDUBeXnBDrcWp6gF0Ygks5uuaWhgaJpZM4YaB9p .
-- Dave Gurnell, Untyped http://untyped.com 07967 004805
TL;DR: 👍
I think:
- Case insensitive makes sense when working with human-generated CSV. We want to be lenient in accepting what we're given.
- For machine-generated CSV, it probably doesn't matter as the case isn't changing.
- The least likely scenario is distinguishing between columns based on the case (I've not done a survey, so that's total guesswork).
So yes: case insensitive as a default sounds good.