I gave Shift_JIS but still it is giving unreadable characters for Japanese characters. However english characters continue to work fine.
Main Topics
Browse All TopicsIn my JSP I am doing the following
<head>
<script type="text/javascript">
var newWindow;
function checkForCSVExport()
{
<%
String results = (String) session.getAttribute("EXCE
String URL = (String) Form.makeUrl(request,"/cus
if(null != results)
{
out.println(
"newWindow=window.open(\""
+ URL
+ "\", \"export\", \"toolbar=no,menubar=no,wi
}
%>
}
</script>
</head>
the String results contain comma seperated values with Japanese characters in them. We need to write these Japanese characters to CSV. For this we have a JSP page called load_csv.jsp. Here are its contents
<%@ page contentType="application/c
<%@ page import="com.components.sea
<%
String strFBResults = (String)session.getAttribu
String strFBHdr = (String)session.getAttribu
response.setHeader("Conten
%>
<%=strFBHdr%>
<%=strFBResults%>
this works fine for English characters but Japanese characters are displayed as junk characters in CSV. Please help.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
The central problem seems to be that CSV files normally have no support for Unicode. See
http://drupal.org/node/172
In fact, there's nothing wrong with your file, but OpenOffice Calc (for one) simply refuses to open as UTF-8, despite the default encoding on my system being that anyway.
You might have more luck opening in Excel if you prepend a BOM (0xEF0xBB0xBF) to the file
There is an interesting thing that I observed. If I right click on the CSV file and select "Open with --> Word" then the word application asks me
"Select the encoding that makes your document readable". If I select "Unicode (UTF-8)", Japanese characters appear perfectly fine. But why doesn't this happen in excel as that is also UTF-8 compliant since I can type japanese characters into the same excel file.
Well i posted the code at http:#23104108
Apply the small correction i posted after that
Business Accounts
Answer for Membership
by: TomasHelgiPosted on 2008-12-03 at 00:39:43ID: 23084135
Hi!
sv; charset=UTF-8" %>
Try changing the charset from UTF-8 to a Japanese charset.
<%@ page contentType="application/c
----------------------
Regards,
Tomas Helgi