This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: UploadedFile and filenames with non-ascii chars
 
Similar Threads
problem with error message displaying
Help needed with MultipartRequest from O'Reilly.
File Upload Component.
UploadedFile Implementation
Submit multipart and form data