[PyQt] Large unicode / Linux problem
Phil Thompson
phil at riverbankcomputing.com
Thu Aug 6 00:16:19 BST 2009
On Wed, 5 Aug 2009 17:51:30 +0100, Peter Howard
<peterhoward42 at googlemail.com> wrote:
> Hi Phil,
>
> We've considerably reduced the problem space.
> On suspect platforms only, this fragment in an interactive shell suggests
> the QString has been truncated:
>
> from PyQt4.QtCore import QString
> s = QString(u'\U0001D122')
> s
>
> Have you any additional advice arising from that new info?
>
> I note your self-built Linux system was Qt4.5.2 - whereas mine was 4.5.0
>
> What is the possibility that this is a bug that only manifested on Linux,
> but that has been fixed between those releases?
It's a PyQt bug - fixed in tonight's snapshot (the current one by the time
you read this).
Strictly speaking it's a Qt limitation that was fixed in Qt v4.2 but PyQt
wasn't changed to take advantage of it. It only happens when Python is
built to use 4 bytes to store a unicode character (rather than 2), which is
not the default but most Linux distros seem to build it that way. Hence it
worked fine on Windows and on my standard builds.
Phil
More information about the PyQt
mailing list