Chinese messages appear garbled in debug console
See original GitHub issueAs reported by @DFVSQY here https://github.com/Microsoft/vscode/issues/35235
- Have the following program
using System;
namespace files
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("文件 编辑 选择 查看 转到 调试 任务 帮助");
Console.WriteLine("哈哈");
}
}
}
- Have your windows machine setup to use simplified chineese
- Have vscode setup to use simplified chineese
- Run the program, notice garbled characters
- Notice garbled output in the C# extension output channel
Work around:
Add the following at the start of the program:
Console.OutputEncoding = System.Text.Encoding.UTF8;
Alternative work around:
Edit launch.json to change "console"
to use the integrated terminal:
"console": "integratedTerminal"
Notes:
- this is not happening with other debug adapters thus I am assuming that the C# debug backend is sending wrong characters to vscode.
- I was not able to reproduce this with just setting vscode to use chineese, I think the whole OS language has to be changed.
- I get lots of bugs around this in the vscode repo from chineese people every mileston only for C# debugging.
Please ping if you need more details.
Issue Analytics
- State:
- Created 6 years ago
- Comments:33 (20 by maintainers)
Top Results From Across the Web
Why does debugging with lldb in VSCode garble chinese ...
it renders weird characters to the VSCode debug terminal. I thought the problem would go away after installing language pack, but no such...
Read more >idea build console display Chinese in garbled code
idea build console display Chinese in garbled code Follow when run "gradle build" in terminal, Chinese characters are display correctly. But if ...
Read more >The console displays garbled characters in Chinese?
My computer has been displaying normally before, and I did not install new software and updates, and suddenly it showed Chinese garbled characters....
Read more >How Do I Solve the Problem that Chinese Characters Are ...
When an app project is created, Chinese characters are displayed as garbled characters in, for example, the README_CN.md file. See Figure 1.
Read more >PowerShell Console characters garbled for Chinese ...
PowerShell Console characters are garbled for Chinese, Japanese, and Korean languages on Windows Server 2022.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@gregg-miskelly thanks. With the support of running tasks in the terminal this is not needed anymore since the terminal itself already allows to specify encodings.
This bug is reproduced. Check out https://github.com/OmniSharp/omnisharp-vscode/issues/3437