tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Webster>
Subject x:out ignores XML documents character encoding
Date Fri, 31 Mar 2006 01:43:11 GMT
Perhaps someone can tell me if this is a bug or if I'm doing something 

I have an XML document with some UTF-8 encoded strings in it. The XML 
document is labeled as being encoded in UTF-8. I want to print those 
strings out using the x:out tag in a UTF-8 encoded JSP. The problem 
seems to be that strings which come out of x:out are always labeled as 
being ISO-8859-1 encoded. This causes the JspWriter to perform an 
unnecessary ISO-8859-1 to UTF-8 conversion on the string. The resulting 
page is UTF-8 but the strings are incorrect due to the conversion. (At 
least thats what I think is going on.)

I've discovered a workaround to this problem. I create a new UTF-8 
string based on the getBytes() of the string that comes out of x:out. 
These strings show up correctly.

I'm using Tomcat 5.5 and Standard-1.1 taglibs. Any thoughts? I'd rather 
not have to use the workaround.

View raw message