Skip to content

Commit

Permalink
[calc] Properly support unicode
Browse files Browse the repository at this point in the history
Issue #240
  • Loading branch information
Elad Alfassa committed Apr 25, 2013
1 parent fca68d0 commit 2c1aa44
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions willie/modules/calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@


def calculate(q):
q = q.encode('utf8')
q = q.replace('\xcf\x95', 'phi') # utf-8 U+03D5
q = q.replace('\xcf\x80', 'pi') # utf-8 U+03C0
uri = 'http://www.google.com/ig/calculator?q='
Expand Down

0 comments on commit 2c1aa44

Please sign in to comment.