-
Notifications
You must be signed in to change notification settings - Fork 130
.tsv file with "Illegal quoting" #848
Comments
Reply from GitHub Support:
|
The problem is that CSV / TSV are under-specified / have multiple incompatible implementations. Quotes could be a way to escape tabs that are part of the content, as in some CSV implementations. |
TSV is not under-specified but has a well defined formal BNF definition in the IANA standard: https://www.iana.org/assignments/media-types/text/tab-separated-values There are implementations that do not follow the IANA standard. However, I could not find a different published formal specification. Can you provide a pointer? |
I did not know about the IANA standard. By under-specified I meant I expected there to be "several incompatible popular implementations", and in the end what matters are the de-facto implementations. In particular, I expect some implementations to allow for a method of escaping the tabs, which is not allowed in that standard, but I don't know if that is actually the case. If you find that out, I recommend adding it to the description of this issue. BTW, I now learned that the CSV RFC does however allow for comma escaping: https://tools.ietf.org/html/rfc4180 |
drop tsv support because it is broken on GitHub: isaacs/github#848
I have stumbled upon this error in a gist of mine, https://gist.github.com/joewiz/194e86f6f7d4e64ca21145cff630eaee. I'd be grateful if the TSV parsing could be updated to handle quotes, which are valid in TSV cells. (The IETF link above is about CSV, whereas the IANA link about TSV says nothing about quotes needing special handling.) |
I also ran into this issue with a Google-Sheets-exported TSV file. The response above helps us understand the current situation:
Using a CSV parser to read TSV files is the problem. Please provide a TSV parser that accepts quotes and double-quotes in the fields. |
A .tsv file that contains quotes triggers this error message:
"We can make this file beautiful and searchable if this error is
corrected: Illegal quoting in line 2."
Example: https://github.com/julianladisch/tsv/blob/master/example.tsv
However, quotes in .tsv files do not have any special meaning so there cannot be any illegal quoting.
See these references for .tsv files:
https://en.wikipedia.org/wiki/Tab-separated_values
https://www.iana.org/assignments/media-types/text/tab-separated-values
I would be very pleased if you can change the .tsv rendering accordingly.
The text was updated successfully, but these errors were encountered: