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.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to