svpino / rfeed

Extensible RSS 2.0 Feed Generator written in Python
MIT License
185 stars 41 forks source link

May want to default to UTF-8 encoding #1

Closed DBeath closed 9 years ago

DBeath commented 9 years ago

Great rewrite of PyRSS2Gen, it's made it really easy for me to add an extension for pubsubhubbub links.

I ran into a issue where I was generating feeds using aggregated content from feeds using UTF-8. The UTF-8 content was being added to the generated feed's XML, but because the charset for the feed read ISO-8859-1, the UTF-8 content wasn't being read by Firefox or Tiny Tiny RSS.

I fixed this by changing the saxutils.XMLGenerator to use UTF-8, which seems fine because UTF-8 is backwards compatible with ISO-8859-1.

Not really a big deal, but I figure that PyRSS2Gen was originally written in 2003, and a lot of feeds are using UTF-8 as default these days.

svpino commented 9 years ago

Thanks for your comments! Feel free to submit a pull request and I'll update the library with your fix.