From c7ba6ac784c84e28d4207562bb1361fb0dd9d1dd Mon Sep 17 00:00:00 2001 From: Mark Rawlingson Date: Tue, 29 Jul 2014 11:11:09 -0400 Subject: [PATCH] =?UTF-8?q?encoding=20message=20body=20to=20utf-8=20-=20ch?= =?UTF-8?q?ars=20such=20as=20=C3=A9=20cause=20an=20exception?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shreddit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shreddit.py b/shreddit.py index c813efa..1b94dbe 100755 --- a/shreddit.py +++ b/shreddit.py @@ -118,7 +118,7 @@ for thing in things: if verbose: msg = '/r/{3}/ #{0} with:\n\t"{1}" to\n\t"{2}"'.format( thing.id, - sub(r'\n\r\t', ' ', thing.body[:78]), + sub(r'\n\r\t', ' ', thing.body[:78].encode('utf-8')), replacement_text[:78], thing.subreddit )