Menu

#906 CSV export doesn't escape quotes

None
closed-fixed
Core (462)
5
2018-12-22
2010-10-15
wolfgang
No

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.

Discussion

  • Rob Manning

    Rob Manning - 2010-10-15

    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

     
  • Rob Manning

    Rob Manning - 2010-10-16

    Fixed in subversion. I also added a test case for this. Thanks for the patch!

    Rob

     
  • wolfgang

    wolfgang - 2010-10-16

    Thanks for your swift response Rob! :)

    Wolfgang

     
  • Rob Manning

    Rob Manning - 2010-10-17
    • assigned_to: colbell --> manningr
    • milestone: 126228 --> 3.1
    • status: open --> closed-fixed
     

Log in to post a comment.