I am struggling with encoding of jspf files. When I insert a german umlaut (e.g. "รค") in the jspf the output in the browser is broken (some unreadable character).
I start Spring Boot from within eclipse, the jspf file itself is encoded as UTF-8.
Note that this issue only applies to jspf files. With jsp files everything is working fine as they contain the page directive <%@ page contentType="text/html;charset=UTF-8"%>
.
This is what I tried so far (none of them worked):
- Insert
spring.http.encoding.charset=UTF-8, spring.http.encoding.enabled=true, spring.http.encoding.force=true
in application.properties - Insert
server.servlet.encoding.charset=UTF-8, server.servlet.encoding.enabled=true, server.servlet.encoding.force=true
in application.properties - Use
-Dfile.encoding=UTF-8
as JVM arg - Use a CharacterEncodingFilter
The only working option is to insert page directive in the jspf file:
<%@ page contentType="text/html;charset=UTF-8"%>
But this has to be inserted in every jspf file. I'm looking for some global option.