You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If one of the properties (fields) in the object passed to the write(...) function contains a carriage return (with no following line feed), the resulting output csv is malformed as the field is not quoted. Typical csv parsers, including fast-csv, will treat the this source row as 2 csv lines.
To Reproduce
Send the object below to the write(...) function:
{a: "Line 1\rLine 2"}
The resulting csv file will be as follows (note: I have added the [CR] and [LF] markers for readabilityin the example below):
a[LF]
Line 1[CR]
Line 2
I would expect this instead:
a[LF]
"Line 1[CR]
Line 2"
Interestingly, if the [CR] is followed by an [LF] the output is correct.
Desktop (please complete the following information):
OS: Windows 10; Ubuntu 18
Node Version [e.g. 12.8.0]
The text was updated successfully, but these errors were encountered:
Describe the bug
If one of the properties (fields) in the object passed to the write(...) function contains a carriage return (with no following line feed), the resulting output csv is malformed as the field is not quoted. Typical csv parsers, including fast-csv, will treat the this source row as 2 csv lines.
To Reproduce
Send the object below to the write(...) function:
{a: "Line 1\rLine 2"}
The resulting csv file will be as follows (note: I have added the [CR] and [LF] markers for readabilityin the example below):
I would expect this instead:
Interestingly, if the [CR] is followed by an [LF] the output is correct.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: