summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/wacalc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/wacalc.py b/modules/wacalc.py
index 27d6962..dd1cf31 100644
--- a/modules/wacalc.py
+++ b/modules/wacalc.py
@@ -8,6 +8,7 @@ import urllib, urllib2, re
from xml.etree.ElementTree import ElementTree
whitespace_re = re.compile(r'\s+')
+unicode_re = re.compile(r'(\\:[\da-f]{4})')
class Module(object):
config_section = 'module/wacalc'
@@ -59,6 +60,7 @@ class Module(object):
if result is not None and result.text is not None:
text = result.text
text = whitespace_re.sub(' ', text)
+ text = unicode_re.sub(lambda match: unichr(int(match.group()[2:], 16)), text)
return text.encode('utf-8')
for pod in xml.findall('pod'):
pod_id = pod.attrib['id']