Hi Cocooners,
I'm having a problem with the encoding of a sql query from the SQLTransformer.
Configuration is:
Cocoon 2.0.3-dev from CVS
IBM JDK 1.3
Tomcat 3.3
Oracle 8.1.7
Instead of getting the wanted germans umlauts, I'm apparently getting UTF
encoded characters (instead of � or Üaut; I'm seeing ü).
I've looked at source code and see, that the encoding is set to 'ISO-8859-1'
in the constructor of the SQLTransformer:
...
this.format.put(OutputKeys.ENCODING, "ISO-8859-1");
...
I've configured the HTML serializer in the sitemap to use ISO-8859-1 like
this:
<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>
My pipeline looks like this:
<map:match pattern="sql/who-is-who/*">
<map:aggregate element="page">
<map:part src="{0}.xml"/>
<map:part element="sidebar" src="sidebar.xml"/>
</map:aggregate>
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:parameter name="default.department" value="FSC EP SQ XS%"/>
<map:transform type="sql">
<map:parameter name="use-connection" value="projects"/>
<map:parameter name="department" value="{department}"/>
</map:transform>
<map:transform src="stylesheets/sql.xsl"/>
</map:act>
<map:serialize type="html"/>
</map:match>
The XML file, which contains the query 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>
This basically works all just nicely except for the encoding. I've searched
the archives and found a similar problem described for the LDAPTransformer.
I think, I checked all the available documentation, but either I didn't find
the relevant section to give me a hints or there is indeed a problem.
Any opinions? Thanks.
--
Mit freundlichen Gruessen / Regards
Frank Ridderbusch
Fujitsu Siemens Computers, EP SQ XS1
Heinz Nixdorf Ring, 33106 Paderborn, Germany
Email: [EMAIL PROTECTED]
---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>