Non-ascii characters in velocity templates are broken when displayed
I have non-ascii chars in velocity temp开发者_JAVA技巧late 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"/>
精彩评论