*
The moose likes Struts and the fly likes How to force encoding of web browser to UTF-8 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to force encoding of web browser to UTF-8" Watch "How to force encoding of web browser to UTF-8" New topic
Author

How to force encoding of web browser to UTF-8

Ngo Hoang Minh
Greenhorn

Joined: Apr 26, 2007
Posts: 2
Dear all,

I used tiles of Struts 1.1 and WebSphere. How I force encoding of browser to UTF-8 ? I used an filter to set content type of response to "text/html; charset=UTF-8" - response.setContentType("text/html; charset=UTF-8")
I also set character encoding of request to "UTF-8" - request.setCharacterEncoding("UTF-8") in this filter
I also set <meta http-equiv="content-type" content="text/html; charset=utf-8" /> at template JSP file

but when I run my application, the encoding of web browser (both IE and Fire Fox) did not force to UTF-8

Please help me

Best regards,
Chris Boldon
Ranch Hand

Joined: Aug 10, 2006
Posts: 190
In the top of your JSP:

 
jQuery in Action, 2nd edition
 
subject: How to force encoding of web browser to UTF-8
 
Similar Threads
arabic data from the database
How to Set Character Encodeing in JSP
Displaying Japanese characters in JSP
Post request doesnot support spanish characters in case of Weblogic + Solaris combination
Submitting a text field along with a file?