F
friendsparas
Hi ALL,
Appreciate if anyone can help.
Exported UTF-8 data in CSV file not working as expected.
i am exporting the utf-8(chineese charater) data from my jsp code into
the CSV file ,it is not saving the data in the expected behaviour.the
formate of the CSV file data get changed after exporting the data.
my export code:
HttpServletResponse.setContentType("application/vnd.ms-excel;
charset=UTF-8");
HttpServletResponse.setHeader(Cache-Control,must-revalidate,
post-check=0, pre-check=0);
HttpServletResponse.setHeader(Content-Disposition,
attachment;filename=export.csv);
ServletOutputStream sos = response.getOutputStream();
sos.flush();
//getting the row and column value from the result set
rowValues.add(columnValue);
// this is the end of the record. so add a new line
csvWriter.append(rowValues.toArray());
// write the string buffer to the output stream
sos.println(strWriter.toString());
sos.flush();
i have no issue with jboss and weblogic application server data is
saving in correct form but when i use websphere application server the
data get deformat in the CSV file .
this is coming when i use the browser setting to non english langauge .
my question is like is there any other setting in the websphere
application server for exporting the unicode data to CSV file ?
hope the scope of the questions is not too broad. Kindly let me know
if you need more information.
Thanks a lot.
Appreciate if anyone can help.
Exported UTF-8 data in CSV file not working as expected.
i am exporting the utf-8(chineese charater) data from my jsp code into
the CSV file ,it is not saving the data in the expected behaviour.the
formate of the CSV file data get changed after exporting the data.
my export code:
HttpServletResponse.setContentType("application/vnd.ms-excel;
charset=UTF-8");
HttpServletResponse.setHeader(Cache-Control,must-revalidate,
post-check=0, pre-check=0);
HttpServletResponse.setHeader(Content-Disposition,
attachment;filename=export.csv);
ServletOutputStream sos = response.getOutputStream();
sos.flush();
//getting the row and column value from the result set
rowValues.add(columnValue);
// this is the end of the record. so add a new line
csvWriter.append(rowValues.toArray());
// write the string buffer to the output stream
sos.println(strWriter.toString());
sos.flush();
i have no issue with jboss and weblogic application server data is
saving in correct form but when i use websphere application server the
data get deformat in the CSV file .
this is coming when i use the browser setting to non english langauge .
my question is like is there any other setting in the websphere
application server for exporting the unicode data to CSV file ?
hope the scope of the questions is not too broad. Kindly let me know
if you need more information.
Thanks a lot.