Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading ISO-8859-1 encoding characters in Servlet  RSS feed

 
shiva thadakamadla
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi My request is like this.
My servlet is getting special characters in the Request which belongs to
ISO-8859-1 encoding. Normally the characters belongs to UTF-8 format.

When i print these characters in my servlet it is changing the input string

When the input is Monta�a,
the servlet is printing it as Monta�a.

Does anybody has answer for this.
Please mail me at mail_shiva_t@yahoo.com

This is very urgent.

Thanks in Advance
Shiva
 
sureshbabu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
try this...
request.setCharacterEncoding("ISO-8859-1"); before getting the value from the request.
I've done the same and it works...

Suresh
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've achived similar results, but in a more global way, by changing the LANG environment variable in Linux before starting the app server.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!