aspose file tools*
The moose likes JSP and the fly likes Auto-dectect character encoding in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Auto-dectect character encoding in JSP" Watch "Auto-dectect character encoding in JSP" New topic
Author

Auto-dectect character encoding in JSP

ying lam
Ranch Hand

Joined: May 17, 2004
Posts: 85
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
Marshal

Joined: Mar 22, 2005
Posts: 42931
    
  68
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Auto-dectect character encoding in JSP