Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-442

Pyside2 QtWidgets.QPlainTextEdit.setPlainText() will crash, when is Non-ascii characters, such as gb18030 character set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P4: Low
    • None
    • None
    • PySide
    • None
    • win7 python3.5.2 amd64 pyside2

    Description

      read_fileobject = QFile("out.txt")
      if not read_fileobject.open(QIODevice.WriteOnly | QIODevice.Text):
      return

      input_TextStream = QtCore.QTextStream(read_fileobject)
      input_TextStream.setCodec("utf-8")
      QtWidgets.QPlainTextEdit.setPlainText(input_TextStream.readAll())

      this is QtWidgets.QPlainTextEdit.setPlainText(input_TextStream.readAll()). if text is ascii characters, ok.

      if text is Non-ascii characters, such as gb18030 character set, app will crash.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ctismer Christian Tismer
            liuliuab1 ming liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes