Setting encoding in Grails controller's render method
Posted
by Philippe
on Stack Overflow
See other posts from Stack Overflow
or by Philippe
Published on 2010-06-04T12:39:28Z
Indexed on
2010/06/10
6:12 UTC
Read the original article
Hit count: 481
Hello, I'm trying to build an RSS feed using Grails and Rome.
In my controller's rss action, my last command is :
render(text: getFeed("rss_2.0"), contentType:"application/rss+xml", encoding:"ISO-8859-1 ")
However, when I navigate to my feed's URL, the header is :
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
...
Does anyone have a clue about WHY the encoding is UTF-8 when I set it to ISO-8859-1 in the render method ???
Thanks for your help !
© Stack Overflow or respective owner