• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

utf-8 data with get method not working but post method working.

 
zohaib K khan
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am able to get utf-8 data using POST method but GET method giving junk data

I have attached source code.

I need to get utf-8 data from GET method.


-----------------------------

----------------------------


- Thanks
Zohaib.
 
Sabarish Venkat
Ranch Hand
Posts: 136
Java MySQL Database Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java Ranch welcomes you zohaib,

Always we need to read any input using the right encoding. This requires that you instruct the ServletRequest object what encoding to use before you read any data from it. Once you read data from the Request, the encoding is set forever.
Try using request.setCharacterEncoding("UTF-8")

might this may help you
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic