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 2004/06/04 10:40:43 UTC
DO NOT REPLY [Bug 29386] New: -
pageEncoding attribute is ignored under certain conditions
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29386>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29386
pageEncoding attribute is ignored under certain conditions
Summary: pageEncoding attribute is ignored under certain
conditions
Product: Tomcat 4
Version: 4.1.30
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: Other
Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: mario.winterer@scch.at
If a single page directive is split into multiple instances (according to
JSP.2.10.1 "The page Directive"), the "pageEncoding" attribute is ignored
under the following conditions:
1) The page directive that contains the "pageEncoding" attribute is NOT
defined in the same instance as the "contentType" attribute.
2) The page directive that contains the "pageEncoding" attribute appeares
AFTER the directive that contains the contentType" attribute.
If both conditions are true, pageEncoding is ignored and instead, the
character encoding specified by the "contentType" attribute seems to be used!
example 1:
<%@page contentType="text/html; charset=UTF-8"%>
<%@page pageEncoding="ISO-8859-1"%>
used charset: I don't know, but it is NOT ISO-8859-1, because special LATIN-1
characters are "unreadable" in the generated java servlet code.
example 2:
<%@page pageEncoding="ISO-8859-1"%>
<%@page contentType="text/html; charset=UTF-8"%>
used charset: ISO-8859-1 (which is correct!)
At least it is a bug that the page directives are position dependent! (see
JSP.2.10.1 "The page Directive").
This bug has already been fixed in Tomcat 5 (see bug #29342 and bug #27517)
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org