views:

153

answers:

2

Hi!

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?

+2  A: 

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"/>
glaz666
A: 

See the answer from glaz666 for a start, also for your files make sure you have a Byte Order Mark at the beginning.

I'm currently working on a project where we have multiple languages being sent by email and without the BOM (described above) our emails got trashed on the other end.

Something else to consider.

Dave G