Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#201 Encoding problem in CSV exporting

v4.2.1
closed
nobody
None
5
2011-06-29
2011-06-08
Javier Paniza
No

The "Servlets.setCharacterEncoding" line in the next code from GenerateReportServlet is not valid for all cases:
}
else if (uri.endsWith(".csv")) {
Servlets.setCharacterEncoding(request, response); // THIS LINE DOES NOT WORK IN ALL CASES
response.setContentType("text/x-csv");
synchronized (tab) {
tab.setRequest(request);
response.getWriter().print(TableModels.toCSV(getTableModel(tab, selectedRows, request, true)));
}
}

See the next threads:
https://sourceforge.net/projects/openxava/forums/forum/419690/topic/4040989
https://sourceforge.net/projects/openxava/forums/forum/437013/topic/4513004

Discussion

  • Javier Paniza
    Javier Paniza
    2011-06-29

    Given that it not possible to figure out the enconding of the client machine (the one used by Excel) we have added a new property to xava.properties calles csvEncoding to indicated the wished encoding for CSV files.

     
  • Javier Paniza
    Javier Paniza
    2011-06-29

    • milestone: --> v4.2.1
    • status: open --> closed-fixed