vscode乱码解决方案(cursor同理)

137 阅读1分钟

1.先点开左下角的设置

image.png

2.在上方输入settings

image.png

  1. 点击在settings.json中编辑

image.png

4.里面内容是这样的

image.png

{
    "terminal.integrated.profiles.windows": {
    "PowerShell": {
      "source": "PowerShell",
      "icon": "terminal-powershell",
      "args": ["-NoLogo", "-NoExit", "-Command", "chcp.com 65001"]
    },
    "Command Prompt": {
      "path": ["${env:windir}\\Sysnative\\cmd.exe", "${env:windir}\\System32\\cmd.exe"],
      "args": ["/K", "chcp 65001"],
      "icon": "terminal-cmd"
    }
  },
  "workbench.settings.applyToAllProfiles": [
    
  ],

}

5.新建一个工程文件来验证,随便命名

image.png

6.这里我们输出了四次都是正确的

image.png