-
Notifications
You must be signed in to change notification settings - Fork 1k
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 un-escape escaped quotes in fields #1109
Comments
PS: Remember to also test and credit #1299. |
MOVED from #1299 There are two more or less separate issues: QuotingSome strings contain control characters (wrt a csv file) like
The former is easier to implement and uses less extra storage. The latter is the standard for
Note that quoting always comes with a quote escape method. If the quoted string did not contain any quoting characters, using non escaping quoting would be equivalent to using the double escaping method. If It did also not contain the escape character, escape character escaping quoting would be equivalent as well. Often it is possible to infer the quote escape method used. I would want
Unquotingi.e. the removal of the leading and trailing quote charactars from the string and the unescaping of the string
SummaryReading files with escaped quotes (as specified by the user) is a must. For ease of writing/reading these words sound much more confident than I am about them. I don't want to nag but to help. PS: some example of currently improperly handled data:
|
I think my problem should be added to this, as it relates to allowing escapes and a feature request in the Master task for When exporting using the default
However, when using
Its only when I use the read.csv that this is read correctly as:
Note that this problem persists when forcing quotes, with |
Escapes are defined this standard, RFC 4180: Here is a one line example of the issue: The example shows that
|
If fread does not comply with RFC 4180 for .csv, then why not escalate that to a 'Bug'? |
Just got bit by this... a bit unfortunate that |
Escaping " using "" (qmethod="double") is the only option for tables exported in BigQuery. |
According to the docs:
The following csv should be supported by
fread
.Findings:
as of now, only writing using
qmethod="double"
andread.table
correctly supports write-read such kind of data.Latest dev data.table, my locale, etc:
The text was updated successfully, but these errors were encountered: