Vscode-cmake-tools: Output and terminal windows charset problem

Created on 29 Nov 2017  路  7Comments  路  Source: microsoft/vscode-cmake-tools

Hi, bigcow! Great work!

When i build msvc c++ project, the output window always print garbled,
i tried follow issue's suggestion but they were complicated and didn't work.

https://github.com/Microsoft/vscode/issues/3550

https://github.com/OmniSharp/omnisharp-vscode/issues/1775

can you add some charset encoding settings to make this easy?

bug duplicate

Most helpful comment

I am using the following work around:

  1. create a bat file containing
    chcp 65001 && cmake %*
  2. set cmake.cmakePath to the bat file

I hope this will help.

All 7 comments

vscode version: 1.18.1, shell: 1.7.9, node: 7.9.0

I've had a few troubles with character encoding. This is on the backlog.

I am using the following work around:

  1. create a bat file containing
    chcp 65001 && cmake %*
  2. set cmake.cmakePath to the bat file

I hope this will help.

For now i wrote some python scripts to generate and build the project myself, and every charset encoding is under control in vscode, but i hope this extension will improved later, then i will change back.

Maybe you can temporary patch it by adding an option in settings.json to let user manually set their preferred output encoding, and provide a permanent solution later.

I am using the following work around:

  1. create a bat file containing
    chcp 65001 && cmake %*
  2. set cmake.cmakePath to the bat file

I hope this will help.

@feng-ye I tried your work around, but got following error. It seems .bat can't run.
[rollbar] Unhandled exception: Unhandled Promise rejection: build Error: Impossible: CMake driver died immediately after successful configure {}

This looks like a duplicate of #153 which may have been fixed by PR #550. Is this still an issue for you?

Was this page helpful?
0 / 5 - 0 ratings