I have a usecase:

csv file:
string1,string2\r\n
string1,"string\n
string"\r\n

where before we used fgets which instead of 2 csv lines (above file content is correct) returned 3 where 2-3 where corrupted csv.