LoginSignup
3
1

More than 3 years have passed since last update.

【PostgreSQL】コマンドプロンプトの文字化け

Posted at

環境

  • OS Windows10
  • ツール コマンドプロンプト
  • データベース PostgreSQL

現象

コマンドプロンプトでSQLファイルを実行した時のエラーメッセージが文字化けする

解決策

postgresql.confの設定を変更

PostgreSQL/12/data/postgresql.conf
// 665行目あたり
lc_messages = 'Japanese_Japan.932' // デフォルト
↓
lc_messages = 'en_UC' // こっちに変更

chcpでは解決しなかった

chcp 65001

試してみたけど文字化けしました。他の解決策を探して莫大な時間を費やしてしまったけど、

postgresql.confをいじればいいということになかなか至りませんでした。

PostgreSQLで文字化けに苦しんでいる人がいたら参考にしてみてください。

3
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
3
1