[msbuild][c++] Mojibakes in log if link.exe fails with error
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
If I compile any c++ project with linker errors, the LINK output will looks like this:

It seems that MSBuild uses UTF-16 charset for output, as LINK.EXE from C++ uses OEM charset.
It would be very cool that msbuild could at least call MultibyteCharToWideChar() API on LINK.EXE output to avoid [mojibakes](https://en.wikipedia.org/wiki/Mojibake) as they are sometimes impossible to decode (as example, if you called msbuild in Python tools like [Conan Package Manager](https://conan.io))
### Steps to reproduce
Clone the https://github.com/leha-bot/kind-of-magick example repo and follow the "vcpkg-way" build instructions in README.md as vcpkg is easier to deploy on Windows hosts (and Conan adds yet another bug layer with rendering msbuild utf-16 text as utf-8 😂 🙈 ).
### Expected behavior
The build log will contain proper text w/o mojibakes.
### Actual behavior
See screenshot above.
### Environment data
`msbuild /version` output:
```bat
Microsoft (R) Build Engine версии 16.5.0-preview-19562-03+d72e25031 для .NET Framework
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.
16.5.0.56203
```
Microsoft Visual Studio 2019 with Russian language pack.
OS info:
Windows 8.1 (64-bit)
If applicable, version of the tool that invokes MSBuild (Visual Studio, dotnet CLI, etc):
```bat
cmake --version
cmake version 3.16.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
```
Thank you for your work and MSBuild itself!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.