解决Trea终端乱码的问题
Trea Trea 0

解决方式为:打开:C:\Users\YourUser\AppData\Roaming\Trae CN\User\setting.json文件

将下面的添加进此json文件中:

// 将此自定义 UTF-8 终端设为默认
  "terminal.integrated.defaultProfile.windows": "PowerShell (UTF-8)",
  // 定义一个 UTF-8 的 PowerShell 配置(根据你安装的版本选择 path)
  "terminal.integrated.profiles.windows": {
    "PowerShell (UTF-8)": {
      // 如果用 PowerShell 7,请改为 "C:\\Program Files\\PowerShell\\7\\pwsh.exe"
      "path": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
      "args": [
        "-NoExit",
        "-Command",
        "[Console]::OutputEncoding=[System.Text.Encoding]::UTF8; $OutputEncoding=[System.Text.Encoding]::UTF8"
      ]
    }
  }

解决Trea终端乱码的问题
http://blog.shihd.vip/archives/jie-jue
作者
邯郸
发布于
更新于
许可