From c9645b31054b9b3dbdac5fd02f97ce3805060b92 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sun, 10 Oct 2010 21:58:19 +0200 Subject: gcalc: Fixed encoding errors. --- modules/gcalc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gcalc.py b/modules/gcalc.py index 1596f8d..6abee92 100644 --- a/modules/gcalc.py +++ b/modules/gcalc.py @@ -16,7 +16,7 @@ class Module: u = urllib2.urlopen(url) # fix object keys - data = u.read().replace('lhs', '"lhs"').replace('rhs', '"rhs"').replace('error', '"error"').replace('icc', '"icc"') + data = u.read().decode('iso-8859-1').replace('lhs', '"lhs"').replace('rhs', '"rhs"').replace('error', '"error"').replace('icc', '"icc"') data = json.loads(data) if len(data['error']): return -- cgit v1.2.3