Skip to content

Commit 02ca6b5

Browse files
authored
Issue 687 (#689)
* issue-687 * issue-687
1 parent de938b7 commit 02ca6b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

template/fr.opensagres.xdocreport.template.velocity/src/main/java/fr/opensagres/xdocreport/template/velocity/cache/XDocReportEntryResourceLoader.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.io.InputStreamReader;
2929
import java.io.Reader;
3030
import java.io.UnsupportedEncodingException;
31+
import java.nio.charset.Charset;
3132

3233
import org.apache.velocity.exception.ResourceNotFoundException;
3334
import org.apache.velocity.runtime.RuntimeServices;
@@ -76,7 +77,7 @@ public Reader getResourceReader(String source, String encoding) throws ResourceN
7677
InputStream inputStream = cacheInfo.getInputStream();
7778
if ( inputStream != null )
7879
{
79-
return new InputStreamReader(inputStream);
80+
return encoding != null ? new InputStreamReader(inputStream, Charset.forName(encoding)) : new InputStreamReader(inputStream);
8081
}
8182
}
8283
throw new ResourceNotFoundException( "Cannot find input stream for the entry with source=" + source );

0 commit comments

Comments
 (0)