Closed mohsen3 closed 1 month ago
I made a pull request that fixes this issue: https://github.com/ozataman/csv-conduit/pull/18
By the way, here is the error message that I get when parsing a CSV file generated by MS Excel on Mac:
main: ParseError {errorContexts = [], errorMessage = "endOfInput", errorPosition = 1:31}
This error doesn't appear anymore after applying my patch.
The CSV files generated or edited by Microsoft Excel on Mac OS use an outdated new line char
\r
. Thecsv-conduit
library does not handle this case and throws an exception.I had a look inside the csv-conduit
ByteString
parser and it seems that the library is using the AttoparsecendOfLine
function, which does not handle the\r
case:https://hackage.haskell.org/package/attoparsec-0.13.0.1/docs/src/Data-Attoparsec-ByteString-Internal.html
I think this is an important case since MS Excel on Mac is pretty common.
This fix is pretty simple, anyways. I can make a pull request, if you like.