Skip to content

Commit

Permalink
Create outputStreamWriter with UTF-8 charset for writing html documen…
Browse files Browse the repository at this point in the history
…ts #651

Fix the problem with rendering russian symbols
  • Loading branch information
Artem Artemev committed Apr 6, 2022
1 parent c410e7d commit d9dd7a1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ protected void writeHtmlDocument(BandData rootBand, OutputStream outputStream) {

if (reportTemplate.isGroovy()) {
groovy.text.Template htmlTemplate = getGroovyTemplate();
Writer htmlWriter = new OutputStreamWriter(outputStream);
Writer htmlWriter = new OutputStreamWriter(outputStream, StandardCharsets.UTF_8);
try {
htmlTemplate.make(templateModel).writeTo(htmlWriter);
htmlWriter.close();
Expand All @@ -191,7 +191,7 @@ protected void writeHtmlDocument(BandData rootBand, OutputStream outputStream) {
}
} else {
freemarker.template.Template htmlTemplate = getFreemarkerTemplate();
Writer htmlWriter = new OutputStreamWriter(outputStream);
Writer htmlWriter = new OutputStreamWriter(outputStream, StandardCharsets.UTF_8);

try {
htmlTemplate.process(templateModel, htmlWriter);
Expand Down

0 comments on commit d9dd7a1

Please sign in to comment.