File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes HTML Form Upload produces junk characters Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Practical Unit Testing with TestNG and Mockito this week in the Testing forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "HTML Form Upload produces junk characters" Watch "HTML Form Upload produces junk characters" New topic
Author

HTML Form Upload produces junk characters

Muralidharan Rajamani
Greenhorn

Joined: May 26, 2004
Posts: 1
I have a HTML for with 2 text fields and the upload control. When I give some swedish characters in the text fields and then select a file for upload, the swedish characters in the text fields are coming as Junk. I guess this problem will come for all international characters.

I also found that this problem is because of enctype="multipart/form-data" in form tag (i.e) < form enctype="multipart/form-data" ...>

could anyone please tell me how to solve this?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
Are you storing this in a database or just reading the values?
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Originally posted by Muralidharan Rajamani:
I guess this problem will come for all international characters.

You might want to check your html document: make sure you have a dtd specified with the character encoding utf-8. This way it should work. But you must check the other end as well. Where do you load it to? The Oreily FileUpload Servlet works quite nicly.
Hth
;-) stw
 
 
subject: HTML Form Upload produces junk characters
 
Threads others viewed
Junk characters in field after submitting
About form submission
File Upload help
Action form is not populated while using html:form enctype="multipart/form-data"
Encoding problem with File Upload
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture