Set New PostgreSQL Databases Encoding to Unicode
Fri, Sep 30, 2011You must change encoding for template1. For do that run following.
UPDATE pg_database SET datistemplate = FALSE WHERE datname = 'template1';
DROP DATABASE template1;
CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'UNICODE';
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template1';
#recomended
\c template1
VACUUM FREEZE;