Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unicode filename in download box

843841Mar 11 2007 — edited Mar 11 2007
I need to upload/download files with Unicode names from a file hosting service. Every thing is going fine except one thing - internet explorer.
The problem is that IE doesn't recognize the file name i'm sending as Unicode - showing me an encoded string instead in the download box. The page displays the file name okay however the download box doesn't. The problem happens only if the unicode file name has no extension. With an ascii extension, the file displays fine. With a unicode extension, the name part appears correct but then the extension itself is garbled. Firefox works like a charm.
What I'm basically doing, is that I check for the browser. If IE, I encode the filename and set the content-disposition header and stuff. If firefox, do it the firefox way (mark the filename field in the content-disposition with a * just before the equal sign). I then send the file data into a servlet output stream.
As a temporary solution, I'm appending a .NoExtension extension to extention-less filenames. This has to do for now, unless any body here has a better idea...
please? : ]
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 8 2007
Added on Mar 11 2007
1 comment
146 views