Xiang Zhang added the comment:
With the latest build, even encode will fail:
Python 3.6.0a4+ (default:dad4c42869f6, Sep 6 2016, 21:41:38)
[GCC 5.2.1 20151010] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> u"\ud83d".encode("utf-16-le")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'utf-16-le' codec can't encode character '\ud83d' in
position 0: surrogates not allowed
----------
nosy: +xiang.zhang
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue27971>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com