[docs] [issue13769] json.dump(ensure_ascii=False) return str instead of unicode

Petri Lehtinen report at bugs.python.org
Tue Aug 28 12:44:39 CEST 2012


Petri Lehtinen added the comment:

It may also be unicode if the encoding parameter is used even if there are no unicode objects in the input.

>>> json.dumps([u'Ş'.encode('iso-8859-9')], encoding='iso-8859-9', ensure_ascii=False)
u'["\u015e"]'

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13769>
_______________________________________


More information about the docs mailing list