Converted ui file throws UnicodeEncodeError: 'utf-8' codec can't encode characters in position 1047-1048: surrogates not allowed

Ben Rudiak-Gould benrudiak at gmail.com
Mon Mar 4 18:25:04 GMT 2024


The problem is that U+1F427 (F0 9F 90 A7) in the source is being converted
to \ud83d\udc27 in the string literal when it should be \U0001f427 (or F0
9F 90 A7 since the file encoding is UTF-8 anyway). That would have worked
in earlier Python versions on platforms where wchar_t is 2 bytes, but
current versions use UTF-32 internally.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20240304/511df510/attachment.htm>


More information about the PyQt mailing list