How to generate real UTF-8 XML with grails without the escape characters?

Posted by AngeDeLaMort on Stack Overflow See other posts from Stack Overflow or by AngeDeLaMort
Published on 2010-06-04T15:01:23Z Indexed on 2010/06/12 0:02 UTC
Read the original article Hit count: 257

I have been wondering why when I set the encoding to UTF-8 and rendering the XML it replace the extended characters by escape characters (or character reference) like ’ instead of '?

I'm using the Render method

render(contentType:"text/xml", encoding:"UTF-8") {...}

with a proper header

render(contentType:"text/xml", encoding:"UTF-8", text:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") 

Any idea if there is a way to write it properly?

Thanks.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about grails