Hi,
There are some UTF-8 encoded strings selected from DB and stored in fields of a formBean. These are in Persian(Farsi) and there's a problem in showing them in fields of the corresponding html form. Something like ??? was shown instead of تست after running the application.
What could be wrong with it?
Thanks
Discussions
Web tier: servlets, JSP, Web frameworks: UTF-8 encoded strings in form fields of a Struts based web-app
-
UTF-8 encoded strings in form fields of a Struts based web-app (1 messages)
- Posted by: Majid Makki
- Posted on: July 11 2004 08:07 EDT
Threaded Messages (1)
- UTF-8 encoded strings in form fields of a Struts based web-app by Senthil Chinnaiyan on July 11 2004 21:37 EDT
-
UTF-8 encoded strings in form fields of a Struts based web-app[ Go to top ]
- Posted by: Senthil Chinnaiyan
- Posted on: July 11 2004 21:37 EDT
- in response to Majid Makki
I think you need to set the appropriate content type for UTF-8 in the response object and also if you use <html:write>, you may have to use filter="false" option.
response.setContentType("text/html;charset=utf-8");
Hope this helps,
Senthil.