Display chinese filename problem in download dialog

liunx

Guest
Anyone can help?<br />
<br />
I have encountered a problem when I write code for a file Download <!--more--> function. When I attempt to Download <!--more--> a file with chinese filename using Netscape/Mozilla. It was fail to display the chinese filename in the Download <!--more--> dialog box, some character like (%E5216%BE54) is displayed. But the same set of code is work fine in IE. <br />
Below is the code... <br />
<br />
response.setContentType(sContentType + "; name=\"" + chinesefilename + "\" ; "); <br />
<br />
response.setContentLength((int)file.getBLOBFile().length); <br />
<br />
response.setHeader("Content-Disposition","attachment; filename=\"" + URLEncoder.encode(chinesefilename, "UTF-8") + "\"; charset=\"UTF-8\" ; " ); <br />
<br />
request.setCharacterEncoding("UTF-8"); <br />
<br />
It is my pleasure if anyone can help!<br />
<br />
Thank you very very much!!<!--content-->
 
Back
Top