Can you register a bug in JIRA? Then we can extend XSLTResult to set
content-encoding with response.

2014-05-23 19:28 GMT+02:00 Arturo Flores <arflo...@gmail.com>:
> Apparently SetCharacterEncodingFilter only sets the character encoding for
> incoming content, does not affect the response.  The custom filter in the
> link did work though, thanks for the tip.
>
> Arturo
>
>
>
> On Fri, May 23, 2014 at 8:54 AM, Arturo Flores <arflo...@gmail.com> wrote:
>
>> I already have this in my web.xml:
>>
>> <filter>
>>   <filter-name>CharacterEncodingFilter</filter-name>
>>   <filter-class>
>>     org.apache.catalina.filters.SetCharacterEncodingFilter
>>   </filter-class>
>>   <init-param>
>>     <param-name>encoding</param-name>
>>     <param-value>UTF-8</param-value>
>>   </init-param>
>>   <init-param>
>>     <param-name>ignore</param-name>
>>     <param-value>true</param-value>
>>   </init-param>
>> </filter>
>>
>> <filter-mapping>
>>   <filter-name>CharacterEncodingFilter</filter-name>
>>   <url-pattern>/*</url-pattern>
>> </filter-mapping>
>>
>> Shouldn't this be forcing utf-8 encoding?  I'll try the method in the link
>> you provided as well.
>>
>> Arturo
>>
>>
>>
>> On Fri, May 23, 2014 at 8:39 AM, Lukasz Lenart 
>> <lukaszlen...@apache.org>wrote:
>>
>>> So, encoding is missing. Do two things:
>>> - register a bug in JIRA -> https://issues.apache.org/jira/browse/WW
>>> - use some filter to force UTF-8 encoding ->
>>>
>>> http://stackoverflow.com/questions/138948/how-to-get-utf-8-working-in-java-webapps
>>>
>>>
>>> Regards
>>> --
>>> Łukasz
>>> + 48 606 323 122 http://www.lenart.org.pl/
>>>
>>> 2014-05-23 17:36 GMT+02:00 Arturo Flores <arflo...@gmail.com>:
>>> > The value of Content-Type is text/xml.
>>> >
>>> > Arturo
>>> >
>>> >
>>> > On Thu, May 22, 2014 at 11:47 PM, Lukasz Lenart <
>>> lukaszlen...@apache.org>wrote:
>>> >
>>> >> 2014-05-23 7:54 GMT+02:00 Arturo Flores <arflo...@gmail.com>:
>>> >> > When I request /testutf8 I get the following in the browser:
>>> >> > XML Parsing Error: not well-formed
>>> >> > Location: http://localhost:8080/testutf8
>>> >> > Line Number 1, Column 48:<?xml version="1.0"
>>> >> > encoding="UTF-8"?><result>h�llo world</result>
>>> >> > -----------------------------------------------^
>>> >> >
>>> >> > It seems the utf-8 character is not being handled properly.  How can
>>> I
>>> >> make
>>> >> > the xslt result type handle the utf-8 character correctly?
>>> >>
>>> >> Can you check headers of the response? What's the value of
>>> Content-Type?
>>> >>
>>> >>
>>> >> Regards
>>> >> --
>>> >> Łukasz
>>> >> + 48 606 323 122 http://www.lenart.org.pl/
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> >> For additional commands, e-mail: user-h...@struts.apache.org
>>> >>
>>> >>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>>> For additional commands, e-mail: user-h...@struts.apache.org
>>>
>>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to