From 9f31f6ba1e24e58b852a4a77a6a275f2be323eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 1 Mar 2012 15:54:44 +0100 Subject: [PATCH] Handle when source is not plain ascii --- trans/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trans/util.py b/trans/util.py index ca56767a0..7507fb00f 100644 --- a/trans/util.py +++ b/trans/util.py @@ -21,7 +21,7 @@ def msg_checksum(source, context): We use MD5 as it is faster than SHA1. ''' m = hashlib.md5() - m.update(source) - m.update(context) + m.update(source.encode('utf-8')) + m.update(context.encode('utf-8')) return m.hexdigest()