Converting a Postgresql database from SQL_ASCII, containing mixed encoging types, to UTF-8

后端 未结 4 659
没有蜡笔的小新
没有蜡笔的小新 2021-01-13 14:11

I have a postgresql database I would like to convert to UTF-8.

The problem is that it is currently SQL_ASCII, so hasn\'t been doing any kind of encoding conversion o

4条回答
  •  被撕碎了的回忆
    2021-01-13 14:51

    I resolved using this 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

提交回复
热议问题