I am trying to process RSS feed using Google Reader API, but the issue is that even if feed encoding is UTF-8 it is returned in an unreadable format.
resp.contentType = "text/xml"
resp.characterEncoding = "UTF-8"
URL url = new URL("http://www.google.com/reader/public/atom/feed/" + rss);
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(), Charset.forName("UTF-8")));
String line;
StringBuilder content = new StringBuilder();
while ((line = reader.readLine()) != null) {
content.append(line + "\n");
}
reader.close();
def feed = new XmlParser().parseText(content.toString())
...
new XmlNodePrinter(resp.writer).print(feed)
Is there are any additional encoding settings that I miss? The code runs on Google App Engine.