Hello All,
            I am facing an issue in the excel download,which displays the asian 
characters retrieved from a database.
            If the excel download has around 200rows,the chinese characters are 
printed correctly. If it exceeds 250 rows the chinese characters are printed as 
junk one (视频).
            The excel download is done in the following env,
Struts,Apache tomcat.
            The flow is as mentioned below.
    UI - > Action class - > DAO -> DAOImpl -

Inside DAOImpl,we have the following code.

1.HttpServletResponse response =
                    (HttpServletResponse) argList.get(0);
  response.setContentType("application/msexcel;charset=UTF-8");

2.out.write(getBytes("<td>"+questionResponse+"</td>"));

3.getBytes(String str) is a private method which converts the string to byte 
array.

Following are the alternatives I tried with :

1. Tried with a filter setup,just to ensure that the character encoding is not 
missed at any point of time during the request and response. (didn't work out).

2.Instead of directly writing to the servletoutputstream, created a wrapper and 
tried writing the data to the wrapper. (didn't work out).

3.Thought it might be because of the characters length and tried truncating 
them too,but in vain.
               

Appreciate if you could help me to over come this issue.

Thnx
Joe

                
---------------------------------
Brings words and photos together (easily) with
 PhotoMail  - it's free and works with Yahoo! Mail.

Reply via email to