postgresql修改數據庫編碼

update pg_database set encoding = pg_char_to_encoding('UTF8') where datname = 'your_database';

 

先用 \encoding 指令看看編碼是否預期的編碼,若是不是則修改之。html

 

若是連進去仍是亂碼,多是客戶端默認編碼或者數據庫服務器的語言支持問題了,詳細看: http://www.cnblogs.com/ajianbeyourself/p/4872045.html數據庫

相關文章
相關標籤/搜索