Bug 13996 - setBundle overrides already set output character encoding
Summary: setBundle overrides already set output character encoding
Status: RESOLVED INVALID
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.0
Hardware: All other
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-27 00:48 UTC by Lars Marius Garshol
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Marius Garshol 2002-10-27 00:48:31 UTC
My web application sets the output character encoding (as part of the 
content-type) in a tag defined by us. This tag uses application 
configuration to set the encoding, which defaults to UTF-8. When I take out 
<fmt:setBundle> the output encoding is UTF-8 and my Chinese characters 
display correctly (but all my language strings disappear, of course). If I 
add back <fmt:setBundle> the output encoding becomes ISO 8859-1, and my 
Chinese characters turn into question marks.

I very strongly believe that this tag, and the locale settings, should NOT 
affect the character encoding. Character encoding and locale are orthogonal 
and should be kept strictly separated. Please correct this problem as soon 
as possible, as it keeps me from localizing my web application.
Comment 1 Lars Marius Garshol 2002-10-27 00:53:06 UTC
I get the same problem if I try wrapping my page with <fmt:bundle> instead, so 
it seems that this has to do with the locale settings, somehow.
Comment 2 Lars Marius Garshol 2002-10-27 02:38:15 UTC
I found a workaround: if I put our tag (the one that sets character encoding) 
*after* the fmt:setBundle or fmt:bundle it wins the override race, and all is 
well.
Comment 3 Pierre Delisle 2003-01-13 23:12:21 UTC
Behavior of the tags is correct according to spec (section 8.4).
User has already figured out a workaround for his specific problem.