Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Encoding for CMake Output in VSCode Terminal on Chinese Windows System #4190

Open
shi0rik0 opened this issue Nov 29, 2024 · 1 comment
Labels
bug a bug in the product world ready World Readiness - ensuring we are globally ready with our localized content

Comments

@shi0rik0
Copy link

shi0rik0 commented Nov 29, 2024

Brief Issue Summary

Bug Description

I am using CMake with MSVC to build a C++ program on my Chinese Windows system. With the default settings of CMake Tools, the output displayed in the VSCode terminal has incorrect encoding. Please see the highlighted section in the screenshot below.

Image

Possible Fix

The default setting for cmake.outputLogEncoding is "auto" (related patch: #550). This setting sets the interpreted encoding of CMake output to the ANSI encoding on Windows, which in my case is GBK (cp936).

However, when I set cmake.outputLogEncoding to "utf-8", the output displays correctly, so I suspect that the actual encoding of the CMake output is UTF-8. I believe changing the default setting of cmake.outputLogEncoding to "utf-8" could resolve this bug.

How to Reproduce

I believe that building any CMake project on a non-ASCII Windows system will reproduce this problem.

Related Issues

#3632

CMake Tools Diagnostics

Debug Log

Additional Information

No response

@Amy-Li03
Copy link
Collaborator

Amy-Li03 commented Dec 4, 2024

@shi0rik0 thanks for reporting issue here!
This is similar to issue: #3632, we have linked this issue with it, after that is fixed, please verify this one.
Happy coding!

@Amy-Li03 Amy-Li03 added bug a bug in the product and removed triage labels Dec 4, 2024
@gcampbell-msft gcampbell-msft added the world ready World Readiness - ensuring we are globally ready with our localized content label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the product world ready World Readiness - ensuring we are globally ready with our localized content
Projects
Status: Blocked
Development

No branches or pull requests

3 participants