{"action":"created","issue":{"url":"https://api.github.com/repos/gouthambs/Flask-Blogging/issues/64","labels_url":"https://api.github.com/repos/gouthambs/Flask-Blogging/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/gouthambs/Flask-Blogging/issues/64/comments","events_url":"https://api.github.com/repos/gouthambs/Flask-Blogging/issues/64/events","html_url":"https://github.com/gouthambs/Flask-Blogging/issues/64","id":128375237,"number":64,"title":"blog/feeds/all.atom.xml : UnicodeEncodeError: 'ascii' codec can't encode character u'\\u2019'","user":{"login":"slippers","id":1882613,"avatar_url":"https://avatars.githubusercontent.com/u/1882613?v=3","gravatar_id":"","url":"https://api.github.com/users/slippers","html_url":"https://github.com/slippers","followers_url":"https://api.github.com/users/slippers/followers","following_url":"https://api.github.com/users/slippers/following{/other_user}","gists_url":"https://api.github.com/users/slippers/gists{/gist_id}","starred_url":"https://api.github.com/users/slippers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slippers/subscriptions","organizations_url":"https://api.github.com/users/slippers/orgs","repos_url":"https://api.github.com/users/slippers/repos","events_url":"https://api.github.com/users/slippers/events{/privacy}","received_events_url":"https://api.github.com/users/slippers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-24T05:46:43Z","updated_at":"2016-01-24T05:53:31Z","closed_at":null,"body":"blog/feeds/all.atom.xml dies when there is unicode in the rendered_text. \r\n\r\nCopy and pasting text into some test blogs.  I think the original text was created in word.  Excuse what it says.\r\n\r\nhere was a little testing on the type of text\r\n```\r\nif type(post[\"rendered_text\"]) is unicode:\r\n   text = post[\"rendered_text\"].encode('ascii','ignore')\r\nelse:\r\n   text = str(post[\"rendered_text\"])\r\n```\r\n\r\nerror:\r\n```\r\nFile \"/home/kirk/projects/markovprose/.env/lib/python2.7/site-packages/flask_blogging/views.py\", line 351, in feed\r\n    if len(posts):\r\n        feed_posts_fetched.send(blogging_engine.app, engine=blogging_engine,\r\n                                posts=posts)\r\n        for post in posts:\r\n            blogging_engine.process_post(post, render=True)\r\n            feed.add(post[\"title\"], str(post[\"rendered_text\"]),\r\n                     content_type='html',\r\n                     author=post[\"user_name\"],\r\n                     url=config.get(\"BLOGGING_SITEURL\", \"\")+post[\"url\"],\r\n                     updated=post[\"last_modified_date\"],\r\n                     published=post[\"post_date\"])\r\n[console ready]\r\n>>> post[\"title\"]\r\nu'A Welfare Jerk Dot Com'\r\n>>> str(post[\"rendered_text\"])\r\nTraceback (most recent call last):\r\n\r\nFile \"<debugger>\", line 1, in <module>\r\nstr(post[\"rendered_text\"])\r\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\u2019' in position 4: ordinal not in range(128)\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/gouthambs/Flask-Blogging/issues/comments/174258581","html_url":"https://github.com/gouthambs/Flask-Blogging/issues/64#issuecomment-174258581","issue_url":"https://api.github.com/repos/gouthambs/Flask-Blogging/issues/64","id":174258581,"user":{"login":"gouthambs","id":4218827,"avatar_url":"https://avatars.githubusercontent.com/u/4218827?v=3","gravatar_id":"","url":"https://api.github.com/users/gouthambs","html_url":"https://github.com/gouthambs","followers_url":"https://api.github.com/users/gouthambs/followers","following_url":"https://api.github.com/users/gouthambs/following{/other_user}","gists_url":"https://api.github.com/users/gouthambs/gists{/gist_id}","starred_url":"https://api.github.com/users/gouthambs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gouthambs/subscriptions","organizations_url":"https://api.github.com/users/gouthambs/orgs","repos_url":"https://api.github.com/users/gouthambs/repos","events_url":"https://api.github.com/users/gouthambs/events{/privacy}","received_events_url":"https://api.github.com/users/gouthambs/received_events","type":"User","site_admin":false},"created_at":"2016-01-24T05:53:31Z","updated_at":"2016-01-24T05:53:31Z","body":"This problem may exist for the other views as well, isn't it? Do other views, such as the blog page, index page etc work if you have unicode in them? I don't think I thought much about unicode at that point. \r\n\r\nIf you have a fix, would be happy to take a PR."}}