Visual Studio Codeで拡張機能Code Runnerを使用してPythonのコードを実行すると、「出力」ウィンドウに文字化けした結果が表示されます。
文字化けの解決方法
- Code Runnerの[拡張機能の設定]をクリックします。
- 「Code-runner: Executor Map」の下にある「settings.jsonで編集」をクリックします。
- “code-runner.executorMap”内の”python”の行を以下のように変更します。
変更前:
"python": "python -u",
変更後:
"python": "set PYTHONIOENCODING=utf8 && python -u",
#Code Runner #Visual Studio Code #VSCode #出力 #文字化け