Bug 25456 - <fmt:formatDate> changes the character encoding of the JSP page
Summary: <fmt:formatDate> changes the character encoding of the JSP page
Status: RESOLVED DUPLICATE of bug 19408
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.0.2
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-11 20:11 UTC by Jesse Costello-Good
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Costello-Good 2003-12-11 20:11:02 UTC
Apache Tomcat/4.1.27-LE-jdk14
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-99)
Java HotSpot(TM) Client VM (build 1.4.1_01-27, mixed mode)

These two JSP pages creates a page with the header "Content-Type: text/html;charset=UTF-8"

<%@ page
	contentType="text/html"
	pageEncoding="UTF-8"
	errorPage="/error/server-error.jsp" %>

<html>
<head>
</head>
</html>

***

<%@ page
	contentType="text/html"
	pageEncoding="UTF-8"
	errorPage="/error/server-error.jsp" %>

<html>
<head>
</head>
<body>
<%
	response.flushBuffer();
%>
<fmt:formatDate value="${bean.date}" pattern="MMMM d, yyyy"/>
</body>
</html>


While this one produces one with ISO-8859-1 encoding:

<%@ page
	contentType="text/html"
	pageEncoding="UTF-8"
	errorPage="/error/server-error.jsp" %>

<html>
<head>
</head>
<body>
<fmt:formatDate value="${bean.date}" pattern="MMMM d, yyyy"/>
</body>
</html>
Comment 1 Jesse Costello-Good 2003-12-11 20:11:50 UTC
this was with both versions I tested: 1.0.3 and 1.0.4
Comment 2 Pierre Delisle 2003-12-12 23:46:42 UTC
Jesse,

Please see bug #19408 and test with the Tomcat5/JSTL 1.1 combo.


*** This bug has been marked as a duplicate of 19408 ***