tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 17578] New: - Jasper2 can't change browser's charset
Date Mon, 03 Mar 2003 02:23:12 GMT
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


Mime
View raw message