There is the following warning in the docs:
To be done
Input is read line by line. If a record separator is embedded in a quoted field, parsing the record fails and another line is added to the input. This does not nicely deal with other reasons why parsing the row may fail.
The current implementation has no problem with embedded newlines, but I am not sure what “other reasons” might break this. Here is a small working example:
% cat test.csv foo "bar baz" "hmm, hmm"
I tried reading it with both csv_read_file/2 and csv_read_file_row/3, and I get the same, correct result:
?- csv_read_file("test.csv", X). X = [row(foo), row('bar\nbaz'), row('hmm, hmm')]. ?- csv_read_file_row("test.csv", X, ). X = row(foo) ; X = row('bar\nbaz') ; X = row('hmm, hmm') ; false.
What would be an example CSV that works with csv_read_file/2 but is broken with csv_read_file_row/3?
Edit: … or did I just misunderstand this “to be done” paragraph there?