... btw, another possible aid is
select * from pg_file_settings where name = 'client_encoding';
https://www.postgresql.org/docs/current/static/view-pg-file-settings.html
regards, tom lane