Skip to content

Commit

Permalink
Added encoding for asciidoc
Browse files Browse the repository at this point in the history
  • Loading branch information
nbaars committed Dec 27, 2017
1 parent 8c10000 commit dd7f407
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import java.io.*;
import java.util.Map;

import static org.apache.commons.lang3.CharEncoding.UTF_8;
import static org.asciidoctor.Asciidoctor.Factory.create;

/**
Expand Down Expand Up @@ -82,7 +83,7 @@ public InputStream getResourceAsStream(TemplateProcessingParameters params, Stri
} else {
StringWriter writer = new StringWriter();
asciidoctor.convert(new InputStreamReader(is), writer, createAttributes());
return new ByteArrayInputStream(writer.getBuffer().toString().getBytes());
return new ByteArrayInputStream(writer.getBuffer().toString().getBytes(UTF_8));
}
} catch (IOException e) {
//no html yet
Expand Down

0 comments on commit dd7f407

Please sign in to comment.