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/01/15 19:42:05 UTC
DO NOT REPLY [Bug 16127] New: -
Seems to be a problem doing a static include of content when using a different 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=16127>.
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=16127
Seems to be a problem doing a static include of content when using a different charset.
Summary: Seems to be a problem doing a static include of content
when using a different charset.
Product: Tomcat 5
Version: Nightly Build
Platform: All
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: Jasper2
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: Ryan.Lubke@Sun.COM
According to JSP.4.1 of the 2.0 specificiation, Files included using the include
directive are read using the character encoding of the including page.
For my case, I have a JSP Document encoded in UTF-16BE (the JSP Document also
sets the response content type to text/plain; charset=ISO-8859-1". The document
uses an include directive to include another text document also encoded in
UTF-16BE.
Reviewing the result of the page, I can see that the included content is still
in UTF-16BE instead of ISO-8859-1 (note, I can leave off the contentType
attribute of the page directive so that the response is text/xml with a charset
of UTF-8, but it makes no difference).
Here is the calling JSP Document:
-------------------------------------------------
?xml version="1.0" encoding="UTF-16BE"?>
<root xmlns:jsp="http://java.sun.com/JSP/Page">
<jsp:directive.page contentType="text/plain; charset=ISO-8859-1" />
<jsp:directive.include file="inclusion_utf-16BE.txt" />
</root>
-------------------------------------------------
The included text file contains (encoded in UTF-16BE):
<included>Included Content</included>
The result that I'm seeing looks something like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<root
xmlns:jsp="http://java.sun.com/JSP/Page">^@<^@i^@n^@c^@l^@u^@d^@e^@d^@>^@I^@n^@c^@l^@u^@d^@e^@d^@
^@C^@o^@n^@t^@e^@n^@t^@<^@/^@i^@n^@c^@l^@u^@d^@e^@d^@>^@
</root>
This was working in previous builds.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>