title: Postgresql/JDBC fails with or without UTF8 encoding
body: <p>Using Java 8 and a Postgres 10 Server, and the v 42.2.16 Postgresql Driver,
  I have a basic JDBC query function:</p>
  <pre><code>public List&lt;Map&lt;String, Object&gt;&gt; Query(String sql) throws Exception {
      Connection con = null ;
      PreparedStatement pstmt;
      List&lt;Map&lt;String, Object&gt;&gt; resultSetToList = null;
      try {
          
          con = DriverManager.getConnection(ConnectionString, Properties);
          pstmt = con.prepareStatement( sql );
          pstmt.execute();
          
          ResultSet resultSet = pstmt.getResultSet();
          resultSetToList = resultSetToList(resultSet);
  
          pstmt.close();
  
      } catch(Exception e){
          throw e;
      }
          finally {
      
          if (con != null)
              con.close();
      }
      return resultSetToList;
  }
  </code></pre>
  <p>I execute a query like this:</p>
  <pre><code>Query(&quot;SELECT * FROM bi_functions&quot;);
  </code></pre>
  <p>But it throws an Exception</p>
  <blockquote>
  <p>org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding &quot;UTF8&quot;: 0xa3</p>
  </blockquote>
  <p>The database (provided by 3rd party) has encoding <code>SQL_ASCII</code>. 0xA3 is the 'British Pound' character.</p>
  <p>So I change the query to:</p>
  <pre><code>SET LOCAL CLIENT_ENCODING TO 'SQL_ASCII'; SELECT * FROM bi_functions;
  </code></pre>
  <p>It fails with:</p>
  <blockquote>
  <p>org.postgresql.util.PSQLException: The server's client_encoding parameter was changed to SQL_ASCII. The JDBC driver requires client_encoding to be UTF8 for correct operation.</p>
  </blockquote>
  <p>Is there a way <strong>using plain JDBC</strong> to circumvent this error?</p>