Exported UTF-8 data in CSV file not working as expected

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.
 
O

Oliver Wong

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: [code snipped]

hope the scope of the questions is not too broad. Kindly let me know
if you need more information.

What output did you get? What output did you expect? How did these two
differ?

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top