If the JDBC driver is used, it will automatically set the encoding system on the client to UTF-8, so there is no need to configure this.
See
Refer to "Automatic Character Set Conversion Between Server and Client" in "Server Administration" in the PostgreSQL Documentation for information on encoding systems.
You must match the language settings for the application runtime environment with the message locale settings of the database server.
Set language in the "user.language" system property.
Example
Example of running a Java command with system property specified
java -Duser.language=en TestClass1