> how can I set the client_encoding to what I need?
With SQL:
SET client_encoding = <whatever>
Yours,Laurenz Albe