I am trying to parse an RSS feed with feedparser and insert it into a mySQL table using SQLAlchemy. I was actually able to get this running just fine but today the feed had
Adding charset=utf8
in the connection string definitely helps, but I encountered situations in Python 2.7 when adding convert_unicode=True
to create_engine
was also necessary. SQLAlchemy documentation says it's only to boost performance, but in my case it actually solved the problem of the wrong encoder being used.