Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.1.0
-
None
-
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(); }