I am working on an application that comprises of Hibernate, JPA, Spring.
I have a process that uses Freemarker to send emails at the end of the process.
The data in the free marker template is filled from database. The data has a £ pound symbol in the database but when freemarker processes it, It is convereted into ? symbol.
Code is as below
final StringWriter writer = new StringWriter();
Template template= freemarkerConfiguration.getTemplate("sampleReport.ftl");
template.process(this, writer);
System.out.println(writer.toString());
Printing the data retrieved from database , result is as below
INFO 05-22 10:08:18 Printing ?-- Hex :a3
a3 - Is the hex code for pound symbol but its printing ? as well.
I cannot spot the error