How to convert a db in postgreSQL to utf8?

前端 未结 4 1720
太阳男子
太阳男子 2020-12-31 09:08

I\'ve just got a db in postgreSQL for my project and just realized it\'s in SQL_ASCII encoding, which means \"no encoding\" I think.

So what is the simplest way to c

4条回答
  •  渐次进展
    2020-12-31 09:35

    I resolved using these commands;

    1-) Export

    pg_dump --username=postgres --encoding=ISO88591 database -f database.sql
    

    and after

    2-) Import

    psql -U postgres -d database < database.sql
    

    these commands helped me solve the problem of conversion SQL_ASCII - UTF-8

提交回复
热议问题