• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 136
Netbeans IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic