adaltas / node-csv-parse

CSV parsing implementing the Node.js `stream.Transform` API

Home Page:https://csv.js.org/parse/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TSV files with quotes are not parsed correctly

moltar opened this issue · comments

commented

Describe the bug

Quotes are not parsed and an error is raised:

Invalid Opening Quote: a quote is found inside a field at line 2

To Reproduce

col1  col2
val1  "val "" 2"
parse(report, {
  delimiter: '\t',
  skipEmptyLines: true,
})

Additional context

Tried suggestion from #289, to set quote value to empty string, but then quotes are not parsed at all:

{
  col1: 'val1',
  col2: '"val "" 2"'
}

Thanks!