CSV export doesn't escape quotes
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
The error actually is in fw/src/main/java/net/sourceforge/squirrel_sql/fw/gui/action/TableExportCsvCommand.java at the very end:
private String getDataCSV(String sepChar, Object cellObj)
{
// ...
if(0 <= ret.indexOf(sepChar) || 0 <= ret.indexOf('\n')) // here missing: || 0 <= ret.indexOf('"')
{
ret = "\"" + ret.replaceAll("\"", "\"\"") + "\"";
}
I wanted to fix it locally, but I do not manage to gather all the libs in order to compile everything - I am quite frustrated right now.
Wolfgang,
Sorry to hear of your frustration. As far as compiling, checkout from SVN : we use Maven now! See my documentation in Trac (https://sourceforge.net/apps/trac/squirrel-sql/wiki/DeveloperGuide) on setting up your dev environment. Feedback is welcome :)
Rob
Fixed in subversion. I also added a test case for this. Thanks for the patch!
Rob
Thanks for your swift response Rob! :)
Wolfgang