vscode编译Java时,中文乱码解决办法

1、打开设置

2、搜索“terminal.integrated.windows”,点击 “在 settings.json中编辑”

3、添加配置

"terminal.integrated.defaultProfile.windows": "PowerShell",

    "terminal.integrated.profiles.windows": {

        "PowerShell": {

            "source": "PowerShell",

            "args": [

                "-NoExit", "/c", "chcp 65001"

            ]

        },

        "Git-Bash": {

            "path": "D:\\Program Files\\Git\\bin\\bash.exe",

            "args": []

          }

    },

    "terminal.integrated.tabs.enabled": false,

Leave a Comment

您的邮箱地址不会被公开。 必填项已用 * 标注