I'm going to upgrade from postgresql 9 to postgresql 11, the encoding used is Latin.
I've exported the database using this command pg_dumpall | gzip > /tmp/db.sql.gz
I extracted the exported database
SET default_transaction_read_only = off;
SET client_encoding = 'LATIN1';
SET standard_conforming_strings = on;
CREATE DATABASE db WITH TEMPLATE = template0 OWNER = postgres;
Then I impoted the database using this command
psql -d postgres -f ./db.sql
The database is imported but when I run l+, I've noticed that the encoding UTF8 is used on all databases.
Why the encoding is changed from Latin to UTF8 ? and How can I fix this error ?