Skip to content
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

Feature: provide option for stripping double quotes around (CSV) field values #48

Open
mklement0 opened this issue Mar 23, 2020 · 0 comments

Comments

@mklement0
Copy link

First things first: Great tool, thank you for providing it for free.

Sometimes, CSV data is produced in which fields are all categorically double-quoted.
For instance, PowerShell's Export-Csv and ConvertTo-Csv cmdlets produce such data; e.g.:

"Col1","Col2","Col3"
"Col1Val1","Col2Val1","Col3Val1"
"Col1Val2","Col2Val2","Col3Val2"
"Col1Val3","Col2Val3","Col3Val3"
"Col1Val4","Col2Val4","Col3Val4"
"Col1Val5","Col2Val5","Col3,Val5"

It would be great if there were an option to strip these double quotes, so they don't show up in the output table.

In that context, quoting-aware parsing would be helpful, as any embedded , chars. (in double-quoted fields) aren't currently recognized as such (see last column of last row) which relates to #47.

Thus, instead of:

+------------+------------+------------+-------+
|   "Col1"   |   "Col2"   |   "Col3"   |       |
+------------+------------+------------+-------+
| "Col1Val1" | "Col2Val1" | "Col3Val1" |       |
| "Col1Val2" | "Col2Val2" | "Col3Val2" |       |
| "Col1Val3" | "Col2Val3" | "Col3Val3" |       |
| "Col1Val4" | "Col2Val4" | "Col3Val4" |       |
| "Col1Val5" | "Col2Val5" | "Col3      | Val5" |
+------------+------------+------------+-------+

It would be great to have:


+----------+----------+-----------+
|   Col1   |   Col2   |   Col3    |
+----------+----------+-----------+
| Col1Val1 | Col2Val1 | Col3Val1  |
| Col1Val2 | Col2Val2 | Col3Val2  |
| Col1Val3 | Col2Val3 | Col3Val3  |
| Col1Val4 | Col2Val4 | Col3Val4  |
| Col1Val5 | Col2Val5 | Col3,Val5 |
+----------+----------+-----------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant