Chinese garbled code when vscode calls CMD to run C / C + +

Online did not find a useful way, and finally found in a tutorial B station

Set – & gt; select workspace – & gt; search encoding – & gt; set to GBK

Principle: the default encoding of CMD is GBK, and the default encoding of vscode is UTF-8. Just change the default encoding of vscode’s current workspace, which will not affect other projects.

Read More: