Non-ascii characters in velocity templates are broken when displayed
-
21-09-2019 - |
문제
I have non-ascii chars in velocity template files. And when processed they are garbled.
The files are saved in UTF-8 encoding and response header contentType is also set to text/html;charset=UTF-8
.
What else can be done?
해결책
Ok, so the solution was to set up following velocity properties (part of Spring's bean def):
<entry key="input.encoding" value="UTF-8"/>
<entry key="output.encoding" value="UTF-8"/>
제휴하지 않습니다 StackOverflow