Public bug reported: # Test Case $ python3 >>> from PyQt5.QtGui import QTextDocument >>> d = QTextDocument() >>> d.setPlainText('÷ Σ') >>> d.toPlainText() '÷ £'
This should not happen. d.toPlainText() should return '÷ Σ'. # Impact The bug was initially reported upstream: https://www.riverbankcomputing.com/pipermail/pyqt/2015-March/035627.html. Some time ago I got the same issue in ReText CI, which uses Ubuntu Trusty. The test failure was observed at https://travis-ci.org/retext- project/retext/builds/186945524. With the proposed upload, the failure disappears. This can also affect other editors which allow to input unicode, like eric. # Proposed Fix The fix which I am uploading to -proposed is taken from this upstream changeset: 2014-04-15 Phil Thompson <p...@riverbankcomputing.com> * qpy/QtCore/qpycore_qstring.cpp: Fixed a bug in the conversion of QStrings with surrogate pairs. [16a9c19d08cf] <5.2-maint> It is present in all releases since v5.3. # Regression Potential The patch is small, should not introduce any regressions. ** Affects: pyqt5 (Ubuntu) Importance: Undecided Status: Fix Released ** Affects: pyqt5 (Ubuntu Trusty) Importance: Undecided Status: New ** Tags: trusty ** Also affects: pyqt5 (Ubuntu Trusty) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1654840 Title: Error in conversion of some characters from QString to Python unicode To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/pyqt5/+bug/1654840/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs