[issue15866] encode(..., 'xmlcharrefreplace') produces entities for surrogate pairs

STINNER Victor report at bugs.python.org
Thu Sep 6 13:06:51 CEST 2012


STINNER Victor added the comment:

Thanks to the PEP 393, this issue is already fixed in Python 3.3.

$ ./python 
Python 3.3.0rc1+ (default:ba2c1def3710+, Sep  3 2012, 23:20:25) 
[GCC 4.6.3 20120306 (Red Hat 4.6.3-2)] on linux
>>> ( u'\U0001f49d' ).encode('ascii', errors='xmlcharrefreplace')
b'💝'

----------
nosy: +haypo

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


More information about the Python-bugs-list mailing list