aspose file tools*
The moose likes JSF and the fly likes UploadedFile and filenames with non-ascii chars Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "UploadedFile and filenames with non-ascii chars" Watch "UploadedFile and filenames with non-ascii chars" New topic
Author

UploadedFile and filenames with non-ascii chars

Ethan Gur
Greenhorn

Joined: Feb 17, 2005
Posts: 12
Hi

I'm using an UploadedFile object in my web app, and all works fine. However, when I try to upload a file, with a filename containing non-ascii chars (e.g. Spanish), I see that the getBytes method returns an empty byte array, the filename is not stored correctly (the non-ascii chars are lost, replaced by another representation), and that the content-type is application/octet-stream instead of image/png as supposed to be.

If I rename that same file to have only ascii chars - everything is back to normal.

How can I upload files with non-ascii chars in their name?
 
Don't get me started about those stupid light bulbs.
 
subject: UploadedFile and filenames with non-ascii chars