• Post Reply Bookmark Topic Watch Topic
  • New Topic

HTML Form Upload produces junk characters

 
Muralidharan Rajamani
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you storing this in a database or just reading the values?
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!