开发者

Non-ascii characters in velocity templates are broken when displayed

开发者 https://www.devze.com 2022-12-24 02:30 出处:网络
I have non-ascii chars in velocity temp开发者_JAVA技巧late files. And when processed they are garbled.

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"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消