title: Wrong encoding for Postgresql messages in JDBC
body: <p>I have an application written in Java that connects to a Postgresql 9.3 database.</p>
  
  <ol>
  <li>The database I'm connecting to is created with UTF-8 enconding.</li>
  <li>The locale for the server where the database is installed is es-uy.UTF-8.</li>
  <li>All the information submitted from the application (web app running in Tomcat 7) is also in UTF-8.</li>
  </ol>
  
  <p>Everything works according to the encoding settings <strong>except</strong> the JDBC exception messages. If I try to connect to the database with a wrong password I get:</p>
  
  <pre><code>org.postgresql.util.PSQLException: FATAL: la autentificaci��n password fall�� para el usuario ��postgres��
  </code></pre>
  
  <p>If I try the same from psql or pgadmin I get the message with the correct encoding:</p>
  
  <pre><code>psql: FATAL:  la autentificación password falló para el usuario «postgres»
  </code></pre>
  
  <p>What is wrong here?</p>