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