I have a SpringBoot Angular app deployed in a Tomcat which is in a CentOs server.
CentOs locale :
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
In the Tomcat's catalina.sh sript, I have the following config :
CATALINA_OPTS="$CATALINA_OPTS -Dfile.encoding='UTF-8'"
In the index.html of the Angular app :
<meta charset="utf-8">
In the pom.xml of the parent project :
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
All files are encoded in UTF-8
With all that some characters are not well displayed :
é -> é
à -> è
° -> °
...
However, the characters from the database are well displayed (the database is encoded in ANSI)
Does anyone have an idea where is my mistake ?
Problem was resolved adding the charset to the js and html mime types into the tomcat's web.xml :