You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/03/03 03:23:12 UTC

DO NOT REPLY [Bug 17578] New: - Jasper2 can't change browser's charset

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17578>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17578

Jasper2 can't change browser's charset 

           Summary: Jasper2 can't change browser's charset
           Product: Tomcat 4
           Version: 4.1.18
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Jasper 2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: echow@macaucabletv.com


In a common JSP, if I set the charset by using HTML form, it will automatically 
change the charset in the browser.

For example:
<%@ page language="java" contentType="text/html" %>
<html>
<head>
   <meta http-equiv="content-type" content="text/html; charset=UTF-8">	
</head>
<body>
   Hello World! Testing...
</body>
</html>


In the above JSP file, if I load it in Tomcat 4.1.8, It can automatically 
change the charset to UTF-8 in the browser. But after I use Jasper2 to convert 
the JSP to Java source file and compiled it. It can't, and always set the 
charset to ISO-8859-1.

If I add the charset in the JSP as

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

I can't display any Far East fonts, such as Chinese. I think Jasper should 
detect if JSP is setting to use Text/Html, it should detect if there any META 
data to set the Charset, if there is, following the HTML charset, otherwise set 
to the default charset ISO-8859-1.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org