You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Lorenzo Sicilia <ar...@kemen.it> on 2004/09/06 15:40:27 UTC
fmt and charset
Hi to all,
I use jstl 1.0.0.6 and jvm sun 1.4.2 on my linux box.
I have this small snippet:
<%@ 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" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>bug fmt</title>
</head>
<body>
<fmt:message key="catalogue.detail" /><br/>
<sql:query var="languageList">
SELECT id_language,name FROM language
</sql:query>
<c:forEach items="${languageList.rows}" var="languageRow">
<c:out value="${languageRow.name}" />
</c:forEach>
</body>
</html>
and this table with mysql 4.0.x
CREATE TABLE `language` (
`id_language` int(11) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`code` varchar(4) NOT NULL default '',
PRIMARY KEY (`id_language`)
) TYPE=InnoDB AUTO_INCREMENT=4 ;
INSERT INTO `language` VALUES (1, 'italiano', 'it');
INSERT INTO `language` VALUES (2, 'française', 'fr');
INSERT INTO `language` VALUES (3, 'english', 'en');
in my web.xml I use:
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>localtext</param-value>
</context-param>
When I use a fmt tag the output from db it is wrong.
I get:
italiano fran?aise english
instead of:
italiano française english
If I remove in web xml the fmt context param and I add in my page haeder:
<fmt:setBundle basename="localtext" />
<%
// bug fmt:setBundle. We need reset contentType
response.setContentType("text/html; charset=ISO-8859-1");
%>
Why???
Some one can help me?
May be it exist some bound with this:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15703
Thanks in advance
Regards Lorenzo
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org