Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 4.12.3
-
None
-
Windows 10
-
-
4c02f807c1d71dcd1065c35c1b497d94c090dca6 (qt-creator/qt-creator/4.13)
Description
QtCreator is using vswhere to detect visual studio products, but if the OS is in non-English locale (e.g. Traditional Chinese), the detection failed with the message:
Could not parse json document from vswhere output.
It appears QtCreator is using the command:
vswhere -products * -prerelease -legacy -format json -utf8
The output is already in UTF-8, but SynchronousProcessResponse is using QTextCodec::codecForLocale() to parse the output, thus non-English locale will see the corrupted output.
It looks like you should somehow set the text codec to QTextCodec::codecForName("UTF8") before getting the stdOut() or just use allRawOutput()
Attachments
For Gerrit Dashboard: QTCREATORBUG-24311 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
307215,2 | MSVC: Use proper codec for vswhere output parsing | 4.13 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |