| Author |
File name in Unicode while downloading
|
Shamu Somasundaram
Ranch Hand
Joined: Aug 25, 2004
Posts: 41
|
|
Hi, I want to display the file name in Unicode when I download the file. In IE it's not displaying properly. My code goes like this res.setContentType("application/octet-stream;charset=UTF-8"); fname = new String(fname.getBytes(),"UTF-8"); res.setHeader("Content-Disposition", "attachment; filename=\"" + fname + "\""); When I run eclipse in debug mode, the filename is displayed properly in Watch expression. But while downloading in IE, in Save As dialog box, the file name appears as junk characters. Can any of the ranchers help me out? Thanks in advance. Shanmugavel
|
 |
vishwanath nadimpally
Ranch Hand
Joined: Jan 25, 2005
Posts: 116
|
|
fname = new String(fname.getBytes(),"UTF-8"); Why do you need this? you can just use the file name as it is.
|
 |
Shamu Somasundaram
Ranch Hand
Joined: Aug 25, 2004
Posts: 41
|
|
Originally posted by vishwanath nadimpally: fname = new String(fname.getBytes(),"UTF-8"); Why do you need this? you can just use the file name as it is.
no..it didn't work..the name was appearing as junk even then.. can anyone help me out?
|
 |
 |
|
|
subject: File name in Unicode while downloading
|
|
|