Skip to content
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

How to ignore outer quotes for all fields when reading CSV? #1092

Closed
nxp2910 opened this issue Aug 1, 2018 · 2 comments
Closed

How to ignore outer quotes for all fields when reading CSV? #1092

nxp2910 opened this issue Aug 1, 2018 · 2 comments

Comments

@nxp2910
Copy link

nxp2910 commented Aug 1, 2018

I am trying to read a csv file formatted similar to the attached file. Each field is surrounded by quotes. When I read the file, is there a way to ignore the outer quotes?
I am using version 7.1.1

test.zip

Thanks.

@renklus
Copy link

renklus commented Aug 3, 2018

According to the documentataion CsvHelper follows RFC 4180. When following RFC 4180 §2.5 - §2.7 the quotes should automatically disappear.
I cannot download zip files so I cannot look at your data, but check these fallback strategies for malformed quotes: Malformed Field Fallback. Especially the leading whitespace in number 3 could be a reason why your quotes are not automatically removed.

@JoshClose
Copy link
Owner

What do you mean by ignoring them? They are a part of the CSV standard. When reading the sample file you provided, the quotes aren't a part of the data you get back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants