diff --git a/doc/template/publish.js b/doc/template/publish.js
index 5a0eb1ff81..dbea28edb7 100644
--- a/doc/template/publish.js
+++ b/doc/template/publish.js
@@ -71,7 +71,7 @@ function generate(title, docs, filename) {
html = helper.resolveLinks(html); // turn {@link foo} into foo
- fs.writeFileSync(outpath, html);
+ fs.writeFileSync(outpath, html, 'utf8');
}
/**
@@ -378,7 +378,7 @@ exports.publish = function(taffyData, opts, tutorials) {
// yes, you can use {@link} in tutorials too!
html = helper.resolveLinks(html); // turn {@link foo} into foo
- fs.writeFileSync(tutorialPath, html);
+ fs.writeFileSync(tutorialPath, html, 'utf8');
}
// tutorials can have only one parent so there is no risk for loops