To display non US-ASCII filename in file download dialog - Help Needed

Hi,

Our application supports to upload a file with name in chinese/japanese language. When user tries to download filedownload dialog box is appearing with the filename as junk characters.

How to solve this issue to display the filename as uploaded.

Thanks in advance

~kans

[304 byte] By [kans76a] at [2007-11-27 11:07:52]
# 1

This is an HTML dialog, isn't it? So I don't see why it's a Java programming question.

DrClapa at 2007-7-29 13:24:50 > top of Java-index,Java Essentials,Java Programming...
# 2

My guess is to make sure that the content type defines the UTF-8 charset in the response header for said file. Presumably, you already use that (supporting multiple languages) in a page that can display the filenames that one wants to download? If you only define it in a meta tag, you really should do so via the Content-Type header.

bsampieria at 2007-7-29 13:24:50 > top of Java-index,Java Essentials,Java Programming...
# 3

DrClap, file download dialog appears by the file content written to ServletOutputStream

~Kans

kans76a at 2007-7-29 13:24:50 > top of Java-index,Java Essentials,Java Programming...
# 4

bsampieri, issue is in display of the file name in file download dialog.

~kans

kans76a at 2007-7-29 13:24:50 > top of Java-index,Java Essentials,Java Programming...
# 5

Sorry, my mistake, I saw the word "upload" and assumed you were asking about uploading a file. What kind of "junk characters" are you seeing?

DrClapa at 2007-7-29 13:24:50 > top of Java-index,Java Essentials,Java Programming...
# 6

> bsampieri, issue is in display of the file name in

> file download dialog.

>

> ~kans

I understood that, but my thought was that the HTTP headers content type containing a charset of UTF-8 might help. I don't know for sure, but otherwise, I don't know how to get the browser to otherwise not assume ASCII.

bsampieria at 2007-7-29 13:24:50 > top of Java-index,Java Essentials,Java Programming...