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
By utf8 char, I think you mean non ASCII char.
In fact utf8 chars are handled by default:
>>> json.dumps(u"\xe7") u"\xe7" .encode( "utf8") ) "iso8859- 1")
'"\\u00e7"'
>>> json.dumps(
'"\\u00e7"'
>>> json.dumps("\xe7", encoding=
'"\\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