tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Kowalczyk <>
Subject Re[2]: [standard] fmt:message overrides my encoding
Date Thu, 12 Sep 2002 08:05:25 GMT
Thursday, September 12, 2002, 12:00:29 AM, you wrote:

JL> Lukasz,

>> All my JSP pages have <%@page contentType='text/html; charset=utf-8'%>
>> directive on top and the browser should get them in UTF-8. When I use
>> <fmt:message> tags, the encoding is reset to my locale's default
>> encoding (which is iso-8859-2 for pl_PL). How can I stop fmt:* tags
>> from resetting response encoding?


JL> In your example, the container determines the char encoding associated
JL> with the "pl" locale to be ISO-8859-2, and uses this charset to
JL> override the charset specified in the page directive. (Tomcat uses 
JL> its "" resource to map a locale to its
JL> charset.)

JL> JSP 1.2 Errata_a is currently being reconsidered by the Servlet 2.4 and
JL> JSP 2.0 expert groups, with some experts arguing that setLocale() should
JL> always set the response's Content-Language header, but should not override
JL> the response's char encoding that was set using setContentType() or
JL> setCharacterEncoding(). 

JL> Hope this answers your question.

Yes, it means I will have to hack JSTL to suit my needs :-)

Thank you.

Ɓukasz Kowalczyk

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

View raw message