You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Arturo Flores <ar...@gmail.com> on 2014/05/23 07:54:45 UTC

utf-8 characters and xslt result type

I have the following in my struts.xml

<action name="testutf8" class="TestXml">
  <result name="success" type="xslt">
    <param name="exposedValue">utf8</param>
    <param name="location">testxml.xsl</param>
  </result>
</action>

My testxml.xsl file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" />
<xsl:template match="result">
<xsl:copy-of select="." />
</xsl:template>
</xsl:stylesheet>

My TestXML.java file looks has the following
public Class TestXml {
  private String utf8="hèllo world"; // a string with utf-8 character,
getters+setters omitted here

  public String execute throws Exception {
    return "success";
  }
}

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?

RE: utf-8 characters and xslt result type

Posted by Martin Gainty <mg...@hotmail.com>.
necesita %C3%A8

por ejemplo
Hell%C3%Ao World

http://www.w3schools.com/tags/ref_urlencode.asp

Saludos Cordiales desde EEUU

Martín  
______________________________________________ 



> Date: Thu, 22 May 2014 22:54:45 -0700
> Subject: utf-8 characters and xslt result type
> From: arflobow@gmail.com
> To: user@struts.apache.org
> 
> I have the following in my struts.xml
> 
> <action name="testutf8" class="TestXml">
>   <result name="success" type="xslt">
>     <param name="exposedValue">utf8</param>
>     <param name="location">testxml.xsl</param>
>   </result>
> </action>
> 
> My testxml.xsl file looks like this:
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="xml" />
> <xsl:template match="result">
> <xsl:copy-of select="." />
> </xsl:template>
> </xsl:stylesheet>
> 
> My TestXML.java file looks has the following
> public Class TestXml {
>   private String utf8="hèllo world"; // a string with utf-8 character,
> getters+setters omitted here
> 
>   public String execute throws Exception {
>     return "success";
>   }
> }
> 
> 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?
 		 	   		  

Re: utf-8 characters and xslt result type

Posted by Arturo Flores <ar...@gmail.com>.
@Lukasz, I registered a bug in JIRA:
https://issues.apache.org/jira/browse/WW-4352

@Paul, yes I did specify output content encoding in the xsl stylesheet,
that was not working.


On Sat, May 24, 2014 at 1:56 PM, Paul Benedict <pb...@apache.org> wrote:

> Your XSL (stylesheet) has the ability to set the output content encoding.
> Are you using that? And does that work?
>
>
> Cheers,
> Paul
>
>
> On Sat, May 24, 2014 at 2:05 PM, Lukasz Lenart <lu...@apache.org>
> wrote:
>
> > 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 <ar...@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 <ar...@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 <
> lukaszlenart@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 <ar...@gmail.com>:
> > >>> > The value of Content-Type is text/xml.
> > >>> >
> > >>> > Arturo
> > >>> >
> > >>> >
> > >>> > On Thu, May 22, 2014 at 11:47 PM, Lukasz Lenart <
> > >>> lukaszlenart@apache.org>wrote:
> > >>> >
> > >>> >> 2014-05-23 7:54 GMT+02:00 Arturo Flores <ar...@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-unsubscribe@struts.apache.org
> > >>> >> For additional commands, e-mail: user-help@struts.apache.org
> > >>> >>
> > >>> >>
> > >>>
> > >>> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > >>> For additional commands, e-mail: user-help@struts.apache.org
> > >>>
> > >>>
> > >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Re: utf-8 characters and xslt result type

Posted by Paul Benedict <pb...@apache.org>.
Your XSL (stylesheet) has the ability to set the output content encoding.
Are you using that? And does that work?


Cheers,
Paul


On Sat, May 24, 2014 at 2:05 PM, Lukasz Lenart <lu...@apache.org>
wrote:

> 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 <ar...@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 <ar...@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 <lukaszlenart@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 <ar...@gmail.com>:
> >>> > The value of Content-Type is text/xml.
> >>> >
> >>> > Arturo
> >>> >
> >>> >
> >>> > On Thu, May 22, 2014 at 11:47 PM, Lukasz Lenart <
> >>> lukaszlenart@apache.org>wrote:
> >>> >
> >>> >> 2014-05-23 7:54 GMT+02:00 Arturo Flores <ar...@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-unsubscribe@struts.apache.org
> >>> >> For additional commands, e-mail: user-help@struts.apache.org
> >>> >>
> >>> >>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: utf-8 characters and xslt result type

Posted by Lukasz Lenart <lu...@apache.org>.
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 <ar...@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 <ar...@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 <lu...@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 <ar...@gmail.com>:
>>> > The value of Content-Type is text/xml.
>>> >
>>> > Arturo
>>> >
>>> >
>>> > On Thu, May 22, 2014 at 11:47 PM, Lukasz Lenart <
>>> lukaszlenart@apache.org>wrote:
>>> >
>>> >> 2014-05-23 7:54 GMT+02:00 Arturo Flores <ar...@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-unsubscribe@struts.apache.org
>>> >> For additional commands, e-mail: user-help@struts.apache.org
>>> >>
>>> >>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>

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


Re: utf-8 characters and xslt result type

Posted by Arturo Flores <ar...@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 <ar...@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 <lu...@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 <ar...@gmail.com>:
>> > The value of Content-Type is text/xml.
>> >
>> > Arturo
>> >
>> >
>> > On Thu, May 22, 2014 at 11:47 PM, Lukasz Lenart <
>> lukaszlenart@apache.org>wrote:
>> >
>> >> 2014-05-23 7:54 GMT+02:00 Arturo Flores <ar...@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-unsubscribe@struts.apache.org
>> >> For additional commands, e-mail: user-help@struts.apache.org
>> >>
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>

Re: utf-8 characters and xslt result type

Posted by Arturo Flores <ar...@gmail.com>.
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 <lu...@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 <ar...@gmail.com>:
> > The value of Content-Type is text/xml.
> >
> > Arturo
> >
> >
> > On Thu, May 22, 2014 at 11:47 PM, Lukasz Lenart <lukaszlenart@apache.org
> >wrote:
> >
> >> 2014-05-23 7:54 GMT+02:00 Arturo Flores <ar...@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-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: utf-8 characters and xslt result type

Posted by Lukasz Lenart <lu...@apache.org>.
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 <ar...@gmail.com>:
> The value of Content-Type is text/xml.
>
> Arturo
>
>
> On Thu, May 22, 2014 at 11:47 PM, Lukasz Lenart <lu...@apache.org>wrote:
>
>> 2014-05-23 7:54 GMT+02:00 Arturo Flores <ar...@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-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>

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


Re: utf-8 characters and xslt result type

Posted by Arturo Flores <ar...@gmail.com>.
The value of Content-Type is text/xml.

Arturo


On Thu, May 22, 2014 at 11:47 PM, Lukasz Lenart <lu...@apache.org>wrote:

> 2014-05-23 7:54 GMT+02:00 Arturo Flores <ar...@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-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: utf-8 characters and xslt result type

Posted by Lukasz Lenart <lu...@apache.org>.
2014-05-23 7:54 GMT+02:00 Arturo Flores <ar...@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-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org