ostap / comp

a tool for querying files in various formats
MIT License
43 stars 2 forks source link

invalid loading of CSV/TSV files with double quotes being part of the value #27

Closed julochrobak closed 10 years ago

julochrobak commented 10 years ago

There are cases where the input file is using double quotes inside the values, yet these quotes are not meant to be treated as special characters but as part of the value.

Currently the loading treats them as enclosing characters and in some circumstances can load data incorrectly:

$ cat wrong.txt 
id  text
1   "Are you all right?" just some text after the quotes (space is enough)
2   ok
$ bin/comp -f wrong.txt 'wrong'
[ { "id": 1, "text": "Are you all right?\" just some text after the quotes (space is enough)\n2\tok\n" } ]
julochrobak commented 10 years ago

There is a duplicated issue created by a pull request - #30