pass unicode to simplejson.loads()

This commit is contained in:
Damien Elmes 2009-03-15 06:39:08 +09:00
parent df3185ab0f
commit 64275642ba

View file

@ -843,7 +843,7 @@ and cards.id in %s""" % ids2str([c[0] for c in cards])))
def unstuff(self, data):
"Uncompress and convert to unicode."
return simplejson.loads(zlib.decompress(data))
return simplejson.loads(unicode(zlib.decompress(data), "utf8"))
def stuff(self, data):
"Convert into UTF-8 and compress."