Makes client_encoding configurable and optional

Makes client_encoding configurable and optional