[PyQt] PyQt cannot trasform QString into str when reading emoji symbol from QClipboard
Pavel Roskin
proski at gnu.org
Thu Jan 22 16:51:54 GMT 2015
Hi!
The UTF-16 representation of that symbol would be 0xD83D, 0xDE87.
That's where the surrogate comes from. But it's not clear why the
unicode string stores surrogates. Maybe your Python build is limited
to 16-bit characters? Try this on the Python prompt:
import sys
hex(sys.maxunicode)
If the result is not '0x10ffff', you need to find a better build of Python.
http://stackoverflow.com/questions/7495150/what-does-sys-maxunicode-mean
Pavel
More information about the PyQt
mailing list