-
Notifications
You must be signed in to change notification settings - Fork 966
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
fread should take care of the double quote escaping "" #4779
Comments
#1109 could possibly be related |
Doubled double-quotes in quoted fields is the RFC 4180 spec for including a double-quote character in a quoted field. Section 2.7 in the RFC: https://tools.ietf.org/html/rfc4180#page-2 I can't see an option to make |
@barryrowlingson Sorry but I could not understand the reason of:
|
@shrektan what I'm saying is that I can't see a way to make
but
where it is returning two doubled quotes. My saying "I can't see an option to make fread compliant with this." is saying that I've looked at the |
Here an example where it seems fread is not doing taking care of the quotes: https://stackoverflow.com/questions/67026291/reading-files-with-double-double-quotes-in-r?noredirect=1 In brief, when reading # Content of csv file
# "numbers", "simple_quote", "double_quote"
# "9", "quoted text", "{""Q0"":""double double quote""}"
library(data.table)
read.csv("test.csv")
#> numbers simple_quote double_quote
#> 1 9 quoted text {"Q0":"double double quote"}
fread("test.csv")
#> numbers simple_quote double_quote
#> 1: 9 quoted text {""Q0"":""double double quote""} |
The basic rule is if you give a character a special function, you need to have a way to escape that function. Anyway, I think it is much better to |
Hello, should we expect a fix/workaround for this issue in a future version? It has been 3 years since the issue was first opened and since then a few other issues have also mentioned this behavior, as we can see above. As I note in #5088, particularly troubling is that |
hi @dhersz thanks for your concern. If you would like this to be fixed in a future version, the next step would be to submit a PR that attempts to fix, so please consider doing that, if you have time to volunteer/help. Also it would be useful to have your opinion on the community survey #5704 and the new governance #5676 |
Hi @tdhock, thanks for the quick reply. Unfortunately I don't have the time nor the expertise to help with a PR here. I'll take a look at the new governance proposal and the community survey, thanks for sharing. |
This example should illustrate what I mean well.
Created on 2020-10-27 by the reprex package (v0.3.0)
Session info
The text was updated successfully, but these errors were encountered: