Hello Steve,
Thanks for your kind words and your detailed response and for the example:
> Farrokh,"Freddy" Mercury,Bulsara
Again the idea is (sorry if that disappoints you) to add better
error recovery support case-by-case / example-by-example. The goal
is, yes, that you can choose / configure how to handle errors incl.
ideally your case where a "broken" line gets skipped / recovered - but
the idea / theory is that there is no one-true-way/solution. Example:
If you (auto) convert 12.2.2 to a float - what do you expect?
- 12.2
- Float::NaN ?
- nil ?
- raise FormatException
- and so on
The idea is to offer all options (with some great defaults, of course).
Anways, thus, back to your sample:
> Farrokh,"Freddy" Mercury,Bulsara
What do you expect?
- A recoverable Format/StrayQuote error/exception?
- Auto-fixing the >"Freddy" Mercury< value if that's possible -
new rule! if quoted value is followed by more data auto-add it until
hitting the separator (that is, comma) and turn the quotes into
"literal" quotes as part of the value
That's my point. Ideally all "errors" can get auto-fixed and
recovered (with sensible defaults).
Thus, if interested you're invited to please keep reporting /
posting more so I can add the "fixes".
I will try to add an "auto-fix" recovery for the >"Freddy"
Mercury< case in the next csvreader library update.
Cheers.
PS: I also started a new ERRORS.md page to document all (recoverable)
built-in auto-fixes [1] and error recovery options.
[1]
https://github.com/csvreader/csvreader/blob/master/ERRORS.md
El dom., 18 nov. 2018 a las 22:05, Steven Jeffries
(<
stevenj...@gmail.com>) escribió:
> --
> You received this message because you are subscribed to the Google Groups "wwwmake" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
wwwmake+u...@googlegroups.com.
> To post to this group, send email to
www...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/wwwmake.
> For more options, visit
https://groups.google.com/d/optout.