[issue18290] json encoder does not support JSONP/JavaScript safe escaping
Antti Haapala
report at bugs.python.org
Mon Jun 24 06:57:24 CEST 2013
Antti Haapala added the comment:
My mistake in writing, json ofc does specify that "control characters" be escaped. Then, it needs to be pointed out that JSON module DOES not currently escape \u007f-\u009f as it maybe strictly should
>>> unicodedata.category('\u007f')
'Cc'
>>> json.dumps({'a': '\u007f'}, ensure_ascii=False)
'{"a": "\x7f"}'
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18290>
_______________________________________
More information about the Python-bugs-list
mailing list