tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lorenzo Sicilia <>
Subject fmt and charset
Date Mon, 06 Sep 2004 13:40:27 GMT
Hi to all,

I use jstl 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="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>bug fmt</title>

<fmt:message key="catalogue.detail" /><br/>
<sql:query var="languageList">
	SELECT id_language,name FROM language
  <c:forEach items="${languageList.rows}" var="languageRow">
	<c:out value="${}" />

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`)

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:

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");

Some one can help me?
May be it exist some bound with this:

Thanks in advance

Regards Lorenzo

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message