diff --git a/template/fr.opensagres.xdocreport.template.velocity/src/main/java/fr/opensagres/xdocreport/template/velocity/cache/XDocReportEntryResourceLoader.java b/template/fr.opensagres.xdocreport.template.velocity/src/main/java/fr/opensagres/xdocreport/template/velocity/cache/XDocReportEntryResourceLoader.java index ab2fc1973..b7db2e65e 100644 --- a/template/fr.opensagres.xdocreport.template.velocity/src/main/java/fr/opensagres/xdocreport/template/velocity/cache/XDocReportEntryResourceLoader.java +++ b/template/fr.opensagres.xdocreport.template.velocity/src/main/java/fr/opensagres/xdocreport/template/velocity/cache/XDocReportEntryResourceLoader.java @@ -28,6 +28,7 @@ import java.io.InputStreamReader; import java.io.Reader; import java.io.UnsupportedEncodingException; +import java.nio.charset.Charset; import org.apache.velocity.exception.ResourceNotFoundException; import org.apache.velocity.runtime.RuntimeServices; @@ -76,7 +77,7 @@ public Reader getResourceReader(String source, String encoding) throws ResourceN InputStream inputStream = cacheInfo.getInputStream(); if ( inputStream != null ) { - return new InputStreamReader(inputStream); + return new InputStreamReader(inputStream, Charset.forName(encoding)); } } throw new ResourceNotFoundException( "Cannot find input stream for the entry with source=" + source );