You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2015/09/22 11:46:04 UTC

[jira] [Commented] (GROOVY-7571) XmlUtil should allow user to specify a character encoding when serializing

    [ https://issues.apache.org/jira/browse/GROOVY-7571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14902303#comment-14902303 ] 

Paul King commented on GROOVY-7571:
-----------------------------------

This involves setting:
{code}
transformer.setOutputProperty(OutputKeys.ENCODING, encoding)
{code}
within {{XmlUtil#serialize(Source source, StreamResult target)}}.

The tricky thing is then working out whether all 18 or so {{serialize}} methods in that class need to be duplicated with the extra param or whether there is a better way to handle that? They are all static methods currently which limits our options.

> XmlUtil should allow user to specify a character encoding when serializing
> --------------------------------------------------------------------------
>
>                 Key: GROOVY-7571
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7571
>             Project: Groovy
>          Issue Type: Improvement
>          Components: XML Processing
>            Reporter: Pascal Schumacher
>            Assignee: Paul King
>
> At the moment groovy.xml.XmlUtil#serialize always creates UTF-8 encoded XML, it would be nice if the user could define the encoding used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)