3 ms·
> 123,ABC,”,””,456 That is badly formatted CSV, assuming ” is a double-quote. Double-quote (") is how you escape commas, so the 3rd entry will make a parser ba
by rendall 5y ago
> 123,ABC,”,””,456
That is badly formatted CSV, assuming ” is a double-quote. Double-quote (") is how you escape commas, so the 3rd entry will make a parser barf, since there is no close quote.
It should be 123,ABC,"","",456
> Turns out when you have data that contains both commas and quotes things get screwey real quick.
Not really. It's pretty logical. If the entry has even one comma, put quotes around it. If it also has quotes, double each of them. Otherwise don't worry about it.
> what happens when the data is something like abc””,?
abc"", becomes "abc"""","