Re: bracket syntax and UTF-8

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Saturday, August 29, 2009, 3:01:04 PM, mschipperheyn wrote:

> Setting <property name="defaultEncoding" value="UTF-8" /> on <bean
> id="freemarkerConfiguration"
>         
> class="org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean">
> in the applicationcontext.xml does not seem to do the trick.

If my initial guess about the BOM stands, then the templates are
decoded correctly (i.e., with UTF-8), otherwise the [#ftl] directive
in the error message would be in column 4.

> The problem as I see it is that spring FreeMarkerView class
> getTemplate(String name, Locale locale) retrieves the template only with
> specific encoding if the encoding variable of FreeMarkerView is set.
> However, this is always null, since only the encoding variable in
> FreeMarkerView.configuration.defaultEncoding can be set through bean
> configuration. Right now, it looks like a spring configuration bug that can
> only be resolved by programmatic intervention. I'd be happy to be proven
> wrong.
>
> Cheers,
>
> Marc

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.