0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

cursorのターミナルの文字化けを解消する

Last updated at Posted at 2025-10-16

setting.jsonの設定を行って文字化けを解消しよう

Windows版のcursor(またはVSCode)を使っているとターミナルが文字化けしてしまうことがある。
出力がUTF-8なのにターミナルがSJISであるため発生していると考える。
そこでターミナルの文字コードをUTF-8にして文字化けを解消しよう。

Windowdを対象にしています。

cursor(またはVSCode)のsettings.jsonを開く

  • cursorエディタを開きctrl + shift + pを押す
  • コマンドパレットが開くのでPreferences: Open Settings (JSON)を入力
  • 開いたsettings.jsonに以下の内容を追記
{
    "terminal.integrated.defaultProfile.windows": "PowerShell",
    "terminal.integrated.profiles.windows": {
        "PowerShell": {
            "source": "PowerShell",
            "args": [
                "-NoExit",
                "-Command",
                "chcp 65001; $OutputEncoding = [System.Text.Encoding]::UTF8; [Console]::OutputEncoding = [System.Text.Encoding]::UTF8"
            ]
            ]
        },
        "Command Prompt": {
            "path": "C:\\Windows\\System32\\cmd.exe",
            "args": [
                "/K",
                "chcp 65001"
            ]
        }
    }
}

これを保存すれば、次回ターミナル起動時からUTF-8で起動する。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?