Closed mauricioaniche closed 7 years ago
hi @mauricioaniche , can you be more specific on this?
Hi @chripard, if you do:
writer.write("field 1", "field 2", "field3, bla bla");
Then, as field3 writes commas, the final CSV will be broken.
What's the best solution for that? Is it for us to print " before field3, e.g., "field3, bla bla"
? But then we will have the same issue with ", and we'll have to escape them as well.
See what's this issue about?
hi @mauricioaniche , i understood the first part of the issue that can be fixed by printing the field included in quotes. I can't replicate the issue with ",
So, suppose the guy does like this:
writer.write("field 1", "field 2", "field3.1, field3.2, \"field3.3\"", "field 4");
The CSV needs to contain 4 columns. The first line should be as follows when I import the CSV:
column 1 = field 1
column 2 = field 2
column 3 = field 3.1, field 3.2, "field 3.3"
column 4 = field 4
okay thanks @mauricioaniche
i think i found a fix for this, shall i pull a request?
Yes, thanks!
On Mon, Nov 14, 2016, 19:03 Christina Pardalidou notifications@github.com wrote:
i think i found a fix for this, shall i pull a request?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mauricioaniche/repodriller/issues/11#issuecomment-260411758, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGJzMZLA0pX-7cZ9wejh54Q2VILW3YYks5q-KJhgaJpZM4GyF3B .
Maurício Aniche Postdoc researcher Delft University of Technology www.mauricioaniche.com @mauricioaniche
printing a directory, as an example, might come with a comma (","), and then the CSV gets unformatted.