Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.15.6
-
None
Description
This is a regression on the windows build of PySide2, this issue does not happen on 5.13.2, nor does it happen on PyQt5, nor does it happen on C++ Qt, nor Linux.
If you try to use a unicode character greater than UTF-16, it will be truncated and it will not render properly. materialdesignicons5-webfont.ttfHere is the font I am using in this simple example.
from PySide2 import QtWidgets, QtGui class Window(QtWidgets.QWidget): def __init__(self): super().__init__() self.mainLayout = QtWidgets.QVBoxLayout() self.setLayout(self.mainLayout) font = 'materialdesignicons5-webfont.ttf' id = QtGui.QFontDatabase.addApplicationFont(font) code = r'0xf01c9' code = chr(int(code, 16)) self.label = QtWidgets.QLabel(code) self.mainLayout.addWidget(self.label) if __name__ == '__main__': import sys app = QtWidgets.QApplication(sys.argv) win = Window() win.show() sys.exit(app.exec_())
Attachments
Issue Links
- duplicates
-
PYSIDE-1835 Truncated multibyte unicode strings
- Closed