I have a problem here and I did not find anything to solve on the internet, if you could help me, I would be extremely grateful.
Well, come on, I have a web application in java that I use Spring Boot + JSP. The problem is this: I have two applications that share the same database, one of them writes things and the other (web) reads, so far everything is ok, but when I write something from the other application that is Desktop, any something that has an accent, the bank is correct but Java can not read on the Web part and exchange for a strange character.
I've already tried:
Create the environment variable: JAVA_TOOL_OPTIONS
with value = -Dfile.encoding=UTF8
Add to file .properties
of Spring the line spring.datasource.connectionProperties=useUnicode=true;characterEncoding=utf-8;
Change the form of the bank URL: spring.datasource.url=jdbc:postgresql://localhost:5432/banco?useUnicode=true&characterEncoding=UTF-8
I tried to set up the POM.
I tried to create a filter.
I tried to change the character directly by the application, however, as it arrives from the database to my application in the wrong way already,
Important information:
The database is configured as follows:
ENCODING = 'SQL_ASCII';
LC_COLLATE = 'C';
LC_CTYPE = 'C'.
If I write something on the web part, I can read it again with the accent normally, however, in the database it looks something like this: