I'm trying to migrate a Postgres 8.4 database in a Brazilian machine to Amazon RDS Postgres 9.4 in North Virginia.
The database uses encoding
pg_default, lc_collate and lc_ctype
- When the web application is connected to the 8.4 database, the accented words are shown normally.
- When I connect it to the 9.4 restored database (created using the same encoding, tablespace, collate and ctype) the accented words are shown weird.
The web application HTML pages have charset defined to
Commands used for pg_dump and restore
pg_dump --file=example --format=custom --host=exampleIP --username=exampleusername --lock-wait-timeout=5000 exampledatabase pg_restore --dbname=exampledatabase --format=custom --host="awsRdsDns" --username=exampleusername --verbose exampleFile
I also tried dump with
--encoding=LATIN1 but nothing changed
When I select those data through PgAdmin3 in both databases, the accented words are shown normally.
What am I doing wrong?
The HTML charset is set to iso-8859-1. Altering HTML charset didn't change it. The RDS client_encoding is UTF8 because the majority of databases uses UTF8, there's only 6 other databases that uses
LATIN1. Is there a way I can change it only for those 6 databases, without affecting the others?
I found out that my problem was my web application CLIENT_ENCODING was UTF8, so my solution was to set it to
LATIN1, but because my question was directed to "other problem" I decided to acept that answer.