the bytestring-csv package appears to have a bug whereby empty fields are
dropped completely from the row, which is different to Text.CSV , which
will return an empty field in the parse result. I'd argue this is a bug in
bytestring-csv, anyone know whether this has been raised before, or know of
a workaround?

Prelude Data.Maybe Data.List Text.CSV.ByteString Data.ByteString.Char8>
parseCSV $ pack "a,b,c\n1,2,3\n1,,9\n"
Just [["a","b","c"],["1","2","3"],["1","9"]]

-- the last row has two fields ^

Prelude Text.CSV> parseCSV "/tmp/err" "a,b,c\n1,2,3\n1,,9\n"
Right [["a","b","c"],["1","2","3"],["1","","9"],[""]]
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to