vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

the Chinese output problem

Open bobo4629 opened this issue 10 years ago • 5 comments

when use the printf() and output the Chinese char it will be uncoded

i think that the VScpp doesn't use the UTF-8 when output.

bobo4629 avatar Aug 06 '16 05:08 bobo4629

@bobo4629 Just for a little more clarification, are you seeing bad characters in your terminal output, or in the debug console?

delmyers avatar Sep 01 '16 19:09 delmyers

in the terminal output

bobo4629 avatar Sep 02 '16 09:09 bobo4629

Can you give more info? Is this when debugging? Where is the printf used?

sean-mcmanus avatar Sep 13 '16 23:09 sean-mcmanus

If you are continuing to have issues with this, please post some additional information and we can investigate further. Thanks!

bobbrow avatar Nov 16 '17 21:11 bobbrow

It seems that DebugConsole does not understand unicode encoding, It only displays the ASCII encoding correctly.

the code:

fprintf(stderr, "test 缺少参数!\n");

the output in cppdbg DebugConsole:

"test\xe7\xbc\xba\xe5\xb0\x91\xe5\x8f\x82\xe6\x95\xb0!\r\n"

light0x00 avatar Apr 27 '20 14:04 light0x00