Hi to all,
I have found a strange behavior of fmt:setLocale I use jrun4, jstl 1.0.5 and mysql.
in my table "language" I have just some fields with special chars like "ç°§éùà..."
I have this simple page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ taglib prefix="c" uri="/WEB-INF/tld/c.tld" %>
<%@ taglib prefix="fmt" uri="/WEB-INF/tld/fmt.tld" %>
<%@ taglib prefix="sql" uri="/WEB-INF/tld/sql.tld" %>
<%-- get data with special chars --%>
<sql:query var="myQuery"> SELECT * FROM language </sql:query>
<%-- loading text. --%> <fmt:setBundle basename="localtext" scope="page" />
<% // bug fmt:setBundle. We need reset contentType response.setContentType("text/html; charset=ISO-8859-1"); %> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>fmt:setLocale bug</title> </head> <body> <body> ContentType:<%=request.getContentType()%><br/> <fmt:message key="title" /> ------ <c:forEach items="${myQuery.rows}" var="row"> <c:out value="${row.name}"/><br /> </c:forEach> </body> </html>
It work fine only if i put: response.setContentType("text/html; charset=ISO-8859-1");
I can't use <fmt:requestEnconding value="ISO-8859-1" />
from <%=request.getContentType()%> i get only null value
Some one can test it with tomcato or other application server?
tks in advance
Lorenzo Sicilia
-- KEMEN srl http://www.kemen.it
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]