cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KOZLOV Roman <r-koz...@opencascade.com>
Subject Re: Problem with SQLTransformer and Encoding
Date Wed, 08 May 2002 12:21:09 GMT
What about generator's encoding?

Roman

Frank Ridderbusch wrote:

> Hi again.
>
> I think, character encoding is driving me nuts.
>
> While I'm tried to investigate a little further with my "SQLTransformer
> and Encoding" problem, I reduced my setup for my XML file to a absolute
> minimum and I still don't get the encoding, which I want.
>
> My stitemap contains:
>
>     <map:serializers default="xml">
>       <map:serializer name="html" mime-type="text/html"
>                       logger="sitemap.serializer.html"
>                       src="org.apache.cocoon.serialization.HTMLSerializer">
>         <encoding>ISO-8859-1</encoding>
>       </map:serializer>
>       <map:serializer name="xml" mime-type="text/xml"
>                       logger="sitemap.serializer.xml"
>                       src="org.apache.cocoon.serialization.XMLSerializer">
>         <encoding>ISO-8859-1</encoding>
>       </map:serializer>
>
> and later in the pipeline
>
>       <map:match pattern="sql/who-is-who/*">
>         <map:generate src="{0}.xml"/>
>         <map:serialize type="xml"/>
>       </map:match>
>
> and the XML file looks like this:
>
>  <?xml version="1.0" encoding="ISO-8859-1"?>
>  <sql xmlns:sql="http://apache.org/cocoon/SQL/2.0">
>    <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
>      <query>
>        select * from mgmt_users
>         where department like '<substitute-value sql:name="department"/>'
>               and (auth like '%chef%' or job_desc like 'Sek%')
>         order by department, surname
>      </query>
>    </execute-query>
>  </sql>
>
> So, everywhere ISO-8859-1. Now, when I request the XML file through
> Mozilla and look at the source, I see:
>
>  <?xml version="1.0" encoding="UTF-8"?>
>  <sql xmlns:sql="http://apache.org/cocoon/SQL/2.0">
>  ....
>
> I look at the source of the XML- and HTMLSerializers and they pratically
> identical. Both extend AbstractTextSerializer.java and therefore a encoding
> change for XML serializer should somehow by visiable.
>
> Where does this "UTF-8" come from.
>
> P.S. My cocoon is still 2.0.3-dev from CVS
> --
> Regards,
>
>         Frank
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message