You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by roy huang <li...@hotmail.com> on 2004/03/16 11:13:32 UTC
SQLTransformer enhancement
In SQLTransformer.java
public SQLTransformer() {
// FIXME (CZ) We have to get the correct encoding from
// somewhere else (XML Serializer?)
this.format = new Properties();
this.format.put(OutputKeys.METHOD, "text");
this.format.put(OutputKeys.ENCODING, "ISO-8859-1");
this.format.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
this.namespaceURI = NAMESPACE;
}
Just like FIXME said,ISO-8859-1 should lead problems.If I use any utf-8 character in sql,the SQL Trasformer will produce an error.
Suggestion :
move this.format to setup,and get encoding from a parameter.
Roy Huang
RE: SQLTransformer enhancement
Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Good idea. I just committed the changes. You can now set the
encoding in the component configuration and as a sitemap parameter.
Thanks
Carsten
> -----Original Message-----
> From: roy huang [mailto:lingererhuang@hotmail.com]
> Sent: Tuesday, March 16, 2004 11:14 AM
> To: dev@cocoon.apache.org
> Subject: SQLTransformer enhancement
>
> In SQLTransformer.java
> public SQLTransformer() {
> // FIXME (CZ) We have to get the correct encoding from
> // somewhere else (XML Serializer?)
> this.format = new Properties();
> this.format.put(OutputKeys.METHOD, "text");
> this.format.put(OutputKeys.ENCODING, "ISO-8859-1");
> this.format.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
> this.namespaceURI = NAMESPACE;
> }
> Just like FIXME said,ISO-8859-1 should lead problems.If I use
> any utf-8 character in sql,the SQL Trasformer will produce an error.
> Suggestion :
> move this.format to setup,and get encoding from a parameter.
>
> Roy Huang
>