File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Problem in displaying the double byte kana characters in csv Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem in displaying the double byte kana characters in csv" Watch "Problem in displaying the double byte kana characters in csv" New topic
Author

Problem in displaying the double byte kana characters in csv

Micheal John
Ranch Hand

Joined: Nov 01, 2006
Posts: 344
I am facing a problem with double byte values (Kanji, Kana Characters - Japenese). I have an application which fetches the double byte values from db and displaying it in jsp page. While dislpaying in the jsp, all the kana and kanji are displaying properly. I need to download the csv(excel) of whatever we displaying in the jsp. While opening the csv, I am getting the question marks(?) in the place of kana and kanji characters. I have tried with setting the content type to UTF-8.

response.setContentType("text/html;UTF-8");
response.setCharacterEncoding("SJIS");

But nothing is working. I am wondering how it's being displaying properly in the JSP page with only setting the content type as UTF-8 charset, but not in the excel. Whether I am missing anything? Please help to throw some light on it.


[ July 29, 2008: Message edited by: Micheal John ]

Micheal John
SCJP 1.4 (86%), SCWCD 1.4 (86%), SCBCD 1.3 (85%), SCDJWS (Just Started...) - Satisfaction Lies in Our EFFORT, Not in the ATTAINMENT
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Have you looked at the actual output from the JSP with a text editor (one that supports that character set)?

If not, it will be hard for you to determine whether the problem is on the JSP side or the Excel side.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in displaying the double byte kana characters in csv