Skip to content

Commit 7ca46d4

Browse files
committed
Ensure that body_template.html is always read as UTF-8
Fixes gh-80
1 parent e7ef27e commit 7ca46d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/ruby/lib/spring-asciidoctor-backends/spring-html5-converter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def postprocess(node, html)
7676
end
7777
match = html.match(/^(.*<body.*?>)(.*)(<\/body>.*)$/m)
7878
templateFile = File.join(File.dirname(File.expand_path(__FILE__)), "body_template.html")
79-
body = File.read(templateFile) % { :body => match[2] }
79+
body = File.read(templateFile, :encoding => 'UTF-8') % { :body => match[2] }
8080
return match[1] + body + match[3]
8181
end
8282

0 commit comments

Comments
 (0)