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

Incorrect encoding used in embedded :/qt/etc/qt.conf resource

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.5.0, 6.4.3
    • 6.0.0, 6.1.0, 6.x, 6.2.0, 6.3.0, 6.4.0
    • PySide
    • None
    • Windows
    • ed1846b94 (dev), 19bb50bcc (6.4), 76cd3bc2b (tqtc/lts-6.2)

    Description

      When generating the embedded :/qt/etc/qt.conf resource, the prefixPath is encoded using the local 8-bit encoding via QString::toLocal8Bit():

      https://github.com/qtproject/pyside-pyside-setup/blob/dd79ee6d29b4a628aad61e24ae361ac6cab20ebf/sources/pyside6/libpyside/pyside.cpp#L878

      However, the QSettings implementation in Qt6 assumes that the values are encoded as UTF-8.

      Therefore, PYSIDE-972 is actually only fixed in PySide6 under Linux and macOS (where QString::toLocal8Bit() is equivalent to QString::toUtf8()), but the issue still persists on Windows. If the path contains a non-ASCII character, the paths returned by QLibraryInfo::path() end up mangled, which for example prevents discovery and loading of plugins.

      Attachments

        Issue Links

          Activity

            People

              kleint Friedemann Kleint
              rok.mandeljc Rok Mandeljc
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: