Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Auto-dectect character encoding in JSP

 
ying lam
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
can you please tell me what do I need to do so that my JSP can enable auto-detect on the browser? (I have load some popular site to make sure my
browser is already auto-detect character encoding).

I have put these in my jsp, but it still does not auto dectect the character encoding.

<%@page contentType="text/html; charset=UTF-8"%>

<meta http-equiv="pragma" content="nocache"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

Thank for any help.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HTML page can't do anything to enable browser features. But it shouldn't need to, because if the encoding is specifically stated as in your example, then there is no need for auto-detection. If you do that, does the browser still use UTF-8 to interpret the page?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic