my origin database is with SQL_ASCII encoding and my future database is with UTF8, which is in another server.
well... I export with this command:
pg_dump -v -E UTF8 -Fc -h x.x.x.x old-database-name -U username > backup.dmp
and try import with this one
pg_restore --single-transaction -v -Fc -d new-database-name -U username < backup.dmp
but I am facing this error:
pg_restore: [arquivador (bd)] Erro ao PROCESSAR TOC: pg_restore:[arquivador (bd)] Erro no registro do TOC 722; 1255 4594720 FUNCTIONWhatever(character varying) username pg_restore: [arquivador (bd)]could not execute query: ERRO: sequência de bytes é inválida paracodificação "UTF8": 0xe1 0x72 0x69
if I dump and restore without -E parameter works well, but my new database then has characters problems.