• 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

How to force encoding of web browser to UTF-8

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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,
 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the top of your JSP:

reply
    Bookmark Topic Watch Topic
  • New Topic