microsoft / vscode-cmake-tools

CMake integration in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=vector-of-bool.cmake-tools
MIT License
1.46k stars 449 forks source link

Encoding of rules.ninja is wrong with Visual Studio 2022. #2741

Open meltybk opened 2 years ago

meltybk commented 2 years ago

Brief Issue Summary

When I run CMake: Configure using CMake Tools, rules.ninja file is output as utf-8, but the character encoding is shift-jis, so it does not build correctly by ninja.

In Windows 10 Japanese Edition, the standard encoding of the command prompt is shift-jis, so usually I would run chcp 65001 before running cmake configure. But CMake Tools does not have a setting to specify the encoding before the running configure.

"cmake.outputLogEncoding": "utf-8" does not fix this problem.

I also try to use Terminal Profiles, but I could not solve the problem. https://code.visualstudio.com/docs/terminal/profiles

This problem not happened, when I used Visual Studio 2019.

CMake Tools Diagnostics

No response

Debug Log

No response

Additional Information

shif-jis code in rules.ninja.

msvc_deps_prefix = ����: �C���N���[�h �t�@�C��:

bobbrow commented 2 years ago

It looks like we only force the codepage to 65001 when running vswhere. We will take a look and see what the best solution for this problem will be. I'm not sure whether other folks depend on the codepage staying as the default for the operating system.