more python3 fixes

This commit is contained in:
mutantmonkey
2011-09-22 15:04:19 -04:00
parent baf5403066
commit 800b78a02f
5 changed files with 12 additions and 12 deletions

View File

@@ -79,9 +79,8 @@ def c(phenny, input):
parts = bytes.split('",')
answer = [p for p in parts if p.startswith('rhs: "')][0][6:]
if answer:
answer = answer.decode('unicode-escape')
answer = ''.join(chr(ord(c)) for c in answer)
answer = answer.decode('utf-8')
#answer = ''.join(chr(ord(c)) for c in answer)
#answer = answer.decode('utf-8')
answer = answer.replace('\xc2\xa0', ',')
answer = answer.replace('<sup>', '^(')
answer = answer.replace('</sup>', ')')