This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
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 Java 8 in Action this week in the Java 8 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:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to force encoding of web browser to UTF-8
 
Similar Threads
Post request doesnot support spanish characters in case of Weblogic + Solaris combination
Submitting a text field along with a file?
arabic data from the database
Displaying Japanese characters in JSP
How to Set Character Encodeing in JSP