0

I'm developing a WebApp using Java Serlvet and JDBC. I'm using Thymeleaf in my HTML pages. I noticed that "special char" like "€" or accented letters (àèìòù) are printed as question marks.

All my html pages start with:

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html lang="it">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" media="all" href="../css/style.css" th:href="@{/css/style.css}"/>
</head> 

I try to add also this to my Abstract Servlet init method (Extends HttpServlet init) templateResolver.setCharacterEncoding("UTF-8");

  • Char are correctly shown if I open a single HTML page as local file with my browser – Stefano Ferrario Apr 14 '20 at 12:35
  • 1
    There are some similar problems like https://stackoverflow.com/questions/5928046/spring-mvc-utf-8-encoding and https://stackoverflow.com/questions/22225040/spring-mvc-java-config which might point you in the right direction. – geco17 Apr 14 '20 at 12:39

0 Answers0