0

we have a CSV file, where we have the following content where comma is coming inbetween the column value. the text enclosure here is ""

here we have 4 fields separated by comma.

2121,john,"Request for: some: create, new account ""SomeUser "" (so123) on GAP and server",34343

Since our delimiter is comma, how do we handle this in Java?

Shankar
  • 8,529
  • 26
  • 90
  • 159
  • @Compass: Basically i need to handle this using escape character and text enclosure.. since we are using it in a tool. what is the escape character and text enclosure will split the string properly? – Shankar Nov 29 '17 at 20:49
  • Use Apache commons csv. Also see this question: https://stackoverflow.com/questions/37803587/skip-double-quotes-when-reading-csv-file-using-apache-commons-csv – tkruse Nov 30 '17 at 01:05
  • There is not really such thing as "a CSV file", because the format is *not* well defined. In particular, use of quotes. – Raedwald Nov 30 '17 at 13:01

0 Answers0