[PyQt] PyQt cannot trasform QString into str when reading emoji symbol from QClipboard

Ilya Kulakov kulakov.ilya at gmail.com
Thu Jan 22 16:58:32 GMT 2015

That's the value I got.

str cannot be encoded into bytes by using utf-16 either.

> On 22 янв. 2015 г., at 22:51, Pavel Roskin <proski at gnu.org> wrote:
> 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