Bug 25456

Summary: <fmt:formatDate> changes the character encoding of the JSP page
Product: Taglibs Reporter: Jesse Costello-Good <jesse>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 1.0.2   
Target Milestone: ---   
Hardware: Other   
OS: other   

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 ***