New issue
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
Escape comma inside a column #346
Comments
My understanding is: This seems like the default behavior to me. I checked and can confirm with our online tool |
Yes that is correct, is this a default config? |
The screenshot I shared use the default config. |
Please share a minimalist and complete example for additionnal help. |
Honestly, I don't think there is much we can do to handle such a scenario. The first quote place the parser in quoting mode and second quote is not escape which makes the field invalid |
I can actually escape the comma, using the option I've tried |
Yes, escape may be composed of multiple characters: https://github.com/adaltas/node-csv/blob/master/packages/csv-parse/test/option.escape.coffee#L69-L79 |
how? |
Look at the tests with the link above, I based my answer on them. |
it didn't work, I think the link above you've provided will work if the character is contiguous. Mine have to escape comma and double quotes just like this |
Hi,
My raw data got a comma from a certain field, While I'm parsing the data it cause me to have a new column instead. How do you escape a comma inside a column to prevent this?
Here is a example of raw csv data
"test@email.org, test2@mail.com",email.org,none,bad
now the data returned from me is
[test@email.org,test2@mail.com,email.org,none,bad]
What I'm expecting is
["test@email.org,test2@mail.com",email.org,none,bad]
I tried to escape the comma by
escape: '\\,'
but it doesn't helpThe text was updated successfully, but these errors were encountered: