tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lorenzo Sicilia <ar...@kemen.it>
Subject fmt and charset
Date Mon, 06 Sep 2004 13:40:27 GMT
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


Mime
View raw message