0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PowerShellで文字化けが発生したときの対処法

Last updated at Posted at 2025-06-07

PowerShellで文字化けが発生したときの対処法(FFmpegインストール例)

*文字化けしていてもインストール自体は普通にできます。

🧩 この記事でわかること

  • PowerShellで日本語が「■■■」と文字化けする原因
  • 文字化けの簡単な直し方(フォント変更+コードページ設定)

🧨 症状:PowerShellで文字化け発生

PowerShellでwinget コマンドなどを実行すると、以下のように「■」が大量に表示されることがあります。

winget install --id=Gyan.FFmpeg -e

実行時の様子:

!文字化けの例image.png

主に以下の2つが原因です:

  1. PowerShellのフォントが日本語非対応
  2. PowerShellのコードページがUTF-8でない

🛠 解決方法

✅ ① フォントを日本語対応のものに変更

  1. PowerShellウィンドウのタイトルバーを右クリック → 「プロパティ」
  2. 「フォント」タブで、**「MS ゴシック」「Yu Gothic UI」**などを選択
  3. OKで保存&PowerShellを再起動

✅ ② コードページを UTF-8 に変更

以下のコマンドを実行:

chcp 65001

出力例:

Active code page: 65001

image.png


🔚 まとめ

項目 設定内容
フォント MS ゴシック / Yu Gothic UI など日本語対応フォント
コードページ 65001(UTF-8)
コマンド chcp 65001 + winget install
0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?