Comment 1 for bug 940430

Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

By utf8 char, I think you mean non ASCII char.
In fact utf8 chars are handled by default:

>>> json.dumps(u"\xe7")
'"\\u00e7"'
>>> json.dumps(u"\xe7".encode("utf8"))
'"\\u00e7"'
>>> json.dumps("\xe7", encoding="iso8859-1")
'"\\u00e7"'
>>> json.dumps("\xe7")
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe7 in position 0: unexpected end of data

So well need to convert this string to utf8 or unicode
I'll take a look at where best to do this conversion