Subject: | Whitespace surrounding the sep_char is not supported (causes parse failure) |
This took me some while to diagnose and suprised me significantly. But this line fails to parse:
1, "String"
and this line parses successfully:
1,"String"
the only difference is the space following the comma. Now this space is near ubiquitous in my experience. It's easy enough to fix by preprocessing the file (i.e. a workaround) but a fairly critical overisght in the CSV parser to my mind. There should at least be an option to ignore all white space (spaces and tabs) surrounding the sep_char.
Anyhow, as I said, surpised me rather. I'll work around it without much trouble now, but it cost me an hour or so to find out what was causing this (as I'm working with huge CSV files with thousands upon thousands of columns and only one of them was causing this, so a painstaking trial and erro through the parse nailed it down to this, and now I'm rolling again.