Postgres: set client encoding default
You can also set it as a default for any user or role (takes effect after a new connection is established):

ALTER ROLE &lt;rolename&gt; SET client_encoding = 'UTF8';