git » el » commit 8969160

Encode the messages in utf8 when sending them via email

author Alberto Bertogli
2010-05-13 13:40:31 UTC
committer Alberto Bertogli
2010-05-13 13:40:31 UTC
parent fcf39719607866af2037c4ad85403f2a0e4d0817

Encode the messages in utf8 when sending them via email

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

el +2 -2

diff --git a/el b/el
index 15ef8cb..ed75d19 100755
--- a/el
+++ b/el
@@ -209,7 +209,7 @@ def send_events(evts):
 		body += "Events for today, %s\n" % today
 		body += "-----------------------------------\n\n"
 		for e in today_evts:
-			body += "%s  %s\n" % (e.date, e.msg)
+			body += "%s  %s\n" % (e.date, e.msg.encode('utf8'))
 		body += "\n"
 	else:
 		body += "No events for today, %s\n" % today
@@ -220,7 +220,7 @@ def send_events(evts):
 		body += "Events for tomorrow, %s\n" % tomorrow
 		body += "-----------------------------------\n\n"
 		for e in tomorrow_evts:
-			body += "%s  %s\n" % (e.date, e.msg)
+			body += "%s  %s\n" % (e.date, e.msg.encode('utf8'))
 		body += "\n"
 	else:
 		body += "No events for tomorrow, %s\n" % tomorrow