25 septembre 2010

Convert a sql_ascii Postgres database to a UTF8 one

pg_dump -f your_db.dmp your_db

iconv -f ISO8859-1 -t UTF-8 your_db.dmp > utf.dmp

psql your_utf_db < utf.dmp

Note that Rails was used to input the data into my old sql_ascii database, so the encoding was consistent. You might not be so lucky...

Aucun commentaire:

Enregistrer un commentaire