We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have noticed that the following csv is parsed incorrectly:
"c1"|"c2"|"c3" "1"|"{2\"|3}"|"4"
The following code:
csv({delimiter:'|', escape: '\\', quote: '"'}) .fromString(`"c1"|"c2"|"c3"\n"1"|"{2\\"|3}"|"4"`) .then((d) => console.log(d))
results in printing:
[ { c1: '1', c2: '"{2\\"', c3: '3}"', field4: '4' } ]
while the expected result is:
[ { c1: '1', c2: '{2"|3}', c3: '4' } ]
I noticed that it only happens when both escaped quote and delimiter are contained inside quoted column, i.e. the following csvs are parsed correctly:
"c1"|"c2"|"c3" "1"|"{2|3}"|"4" => [ { c1: '1', c2: '{2|3}', c3: '4' } ]
"c1"|"c2"|"c3" "1"|"{2\"3}"|"4" => [ { c1: '1', c2: '{2"3}', c3: '4' } ]
The text was updated successfully, but these errors were encountered:
Fix parsing when quote is escaped inside quoted column containing del…
d0571e7
…imiter (Keyang#318)
c31323b
e10862c
98fe0f3
…imiter (#318) (#323)
will be shipped with 2.0.9
Sorry, something went wrong.
No branches or pull requests
I have noticed that the following csv is parsed incorrectly:
The following code:
results in printing:
while the expected result is:
I noticed that it only happens when both escaped quote and delimiter are contained inside quoted column, i.e. the following csvs are parsed correctly:
The text was updated successfully, but these errors were encountered: