LoginSignup
0
0

More than 5 years have passed since last update.

postgresでターミナルからpsqlが文字化けする

Posted at

おそらくだがクライアント側のエンコード設定というのがあって、psqlで入るとその文字コードに変換されて表示されるんだと思う。
なのでそのDBの文字コードがEUCだからって、ターミナルをEUCにしないと文字化けしない訳ではない。
UTF-8に設定されていたら、自動でUTF-8に変換されるのでターミナルはUTF-8にしておかないといけないのだ。
確認はpsqlで入ってから

show client_encoding;

とやる。

 client_encoding 
-----------------
 EUC_JP
(1 row)
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