Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85054

Environment variable QTWEBENGINEPROCESS_PATH cannot get properly UNICODE string on Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 5.15.1
    • 5.15.0
    • WebEngine
    • None
    • Windows
    • 3b93882e2b2397b7e259da30552ff1ee05e0036c (qt/qtwebengine/5.15)

      QString subProcessPath() function from src/core/web_engine_library_info.cpp is using qgetenv to get the QTWEBENGINEPROCESS_PATH for locating QtWebEngineProcess[d].exe. 

       

      QString subProcessPath()
      {
              ...
              ...
              const QByteArray fromEnv = qgetenv("QTWEBENGINEPROCESS_PATH");
              ...
              ...
          return processPath;
      }
      

       We have the issue with folder name with Japanese characters and QtWebEngineProcess[d].exe cannot be loaded.

      In Qt Document, it mentioned about qgetenv like this:

      "Note: on desktop Windows, qgetenv() may produce data loss if the original string contains Unicode characters not representable in the ANSI encoding. Use qEnvironmentVariable() instead. On Unix systems, this function is lossless."
       

      For the UNICODE, Qt document mentioned like this as well.

      "To fully benefit from Unicode, we recommend using QString for storing all user-visible strings, and performing all text file I/O using QTextStream."

       

      Qt Refs:

      1. https://doc.qt.io/qt-5/qtglobal.html#qgetenv
      2. https://doc.qt.io/qt-5/unicode.html

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

            allan.jensen Allan Sandfeld Jensen
            kyawkyawwin18 Kyaw Kyaw Win
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes