I write a CSV file with Open CSV (in version 2.3).
In my CSV file I want to write the following line : I choose a "hero" for this adventure
But I don't find the correct configuration and finally my line is printed, in my CSV file, like that : I choose a ""hero"" for this adventure
So my code is :
CSVWriter writer = null;
writer = new CSVWriter(outputStreamWriter,';',CSVWriter.NO_QUOTE_CHARACTER);
String[] lines = new String[4] ;
lines[0] = "Where is Brian" ;
lines[1] = "42" ;
lines[2] = "I choose a "hero" for this adventure" ;
lines[3] = "May the fourth be with you" ;
for (String line : lines ) {
writer.writeNext(line );
}
writer.close();
How can I write correctly my line ?
Maybe I must use the CSVParser class ?