Hii
I am using struts, jboss 4.0.1 and downloading file from the JSP as an
atachment..
My file has japanese and chinese characters...
The problem is that when i m directly opening this file on the fly from the
Dialog box by clicking on the open button, it is showing me some characters
like %3s or something like.
These characters are appearing file on the dialog box and also saving the
file is OK but i don't know why they get something like while opening on the
fly
I hope these charcters are not properly decode.
I used
try {
fileName = new String(fileName.getBytes("ISO-8859-1"), "UTF-8");
fileName = URLEncoder.encode(fileName, "UTF-8");
fileName = fileName.replace('+', ' ');
} catch (UnsupportedEncodingException UEEx) {
}
URLEncoder.encode(filename,"UTF-8") for non Ascii characters. FileName in
the popup box is coming all right and click on the save button is correctly
saving the file with name.
I am also using
response.setCharacterEncoding("UTF-8");
response.addHeader("Content-Transfer-Encoding", "UTF-8");
response.setHeader("Content-Transfer-Encoding", "UTF-8");
response.setHeader("Content-Disposition", "attachment; filename=\"" +
fileName+ "\"");
Is it related with struts or encoding problem associated with the
environment
Pls help me..
Thanks and Regards,
Kapil Sharma
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]