Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-17219

Creator replaces special characters in environment variables (Build Configuration / Run Configuration )

    XMLWordPrintable

Details

    • b081c2f7b13c1628968f02ebe00b86cb5f081fc3

    Description

      On Windows, launch Qt Creator with a user that has a Cyrillic username. All cyrillic characters in environment variables like APPDATA will be shown as '?' in the Build and Run Settings.

      This does not seem to be purely a UI problem: The 'incorrect' environment variables seem to be also passed on to apps launched inside Qt Creator:

      #include <windows.h>
      #include <QDebug>
      
      int main(int argc, char *argv[])
      {
          wchar_t lwstring[32767];
          GetEnvironmentVariable(L"USERPROFILE", lwstring, 32767);
      
          // With username 'Россия' and launched from Qt Creator this will print
          //    GetEnvironmentVariable('USERPROFILE') "C:\\Users\\??????"
          // from console:
          //    GetEnvironmentVariable('USERPROFILE') "C:\\Users\\\xD0\xA0\xD0\xBE\xD1\x81\xD1\x81\xD0\xB8\xD1\x8F"
          //
          qDebug() << "GetEnvironmentVariable('USERPROFILE')" << QString::fromWCharArray(lwstring).toUtf8();
      }
      

      Attachments

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

        Activity

          People

            hunger Tobias Hunger
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes