I have a Spring Boot (version 1.3) Web application, all in UTF-8, and a PostgreSQL server with server encoding UTF-8 and client encoding WIN1252.
The problem is that when I save in the DB something with special characters manually, the encoding is right, but from JDBC the string is saved wrong.
In the same way, when I have a string saved with special characters and I make a SELECT query to read manually, the encoding is right, but from JDBC the string is read wrongly.
Dropping the database and creating again is not a choice for the moment, so I have been trying a lot of things with poor result. Is there any solution for me?
PD: I have put all these properties in my application.properties file:
spring.datasource.sql-script-encoding = UTF-8
spring.http.encoding.charset = UTF-8
spring.http.encoding.enabled = true
spring.http.encoding.force = true
spring.mandatory-file-encoding = UTF-8
server.tomcat.uri-encoding = UTF-8
spring.messages.encoding = UTF-8
spring.datasource.sqlScriptEncoding=UTF-8instead ofspring.datasource.sql-script-encoding = UTF-8