Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
friendsparas@gmail.com - 15 Dec 2006 10:38 GMT
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.
Oliver Wong - 15 Dec 2006 21:14 GMT
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.