File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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: 39548
    
  27
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?


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Auto-dectect character encoding in JSP
 
Similar Threads
transfering Euro (?) character
How to force encoding of web browser to UTF-8
Struts 2: Encoding UTF-8 problems
Displaying Japanese characters in JSP
Problem in setting character encoding in JSP