Encoding issues with Spring and Freemarker
Posted
by Cameron
on Stack Overflow
See other posts from Stack Overflow
or by Cameron
Published on 2010-03-26T17:11:04Z
Indexed on
2010/03/26
17:13 UTC
Read the original article
Hit count: 570
I'm working on a project using Freemarker and Spring running on Jetty. It will involve displaying characters from many different countries so I'm trying to set the encoding to UTF-8. However, no matter what I do, it remains ISO-8859-1. I tried to create a filter in my web.xml and I've tried putting this
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=utf-8");
just before rendering the view. But when I load the page and click "View Page Info", the encoding is always ISO-8859-1. I've also tried hitting my app server directly to see if it was being affected by Apache but got the same result. Any help is appreciated.
© Stack Overflow or respective owner