tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Webster ...@u.washington.edu>
Subject Re: x:out ignores XML documents character encoding
Date Fri, 31 Mar 2006 18:25:17 GMT
Yes, that fixed it. Once charEncoding="UTF-8" was set in the c:import 
tag the x:out tags started to work. Thanks a bunch for you help!

Kris Schneider wrote:
> One quick thing to try - remove the lines:
>
> <% response.setContentType("text/html; charset=UTF-8"); %>
>
> and
>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
>
> Then, add the directive:
>
> <%@ page pageEncoding="UTF-8" %>
>
> Also import like so:
>
> <c:import url="/reports.xml" charEncoding="UTF-8"/>
>
> Does that change anything?
>
> Eric Webster wrote:
>> Perhaps someone can tell me if this is a bug or if I'm doing 
>> something wrong.
>>
>> 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.
>>
>>
>>
>>
>>
>


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