From 8c2729a39147d9cd7a51570615841acabcdb1fe0 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Sun, 1 Mar 2020 12:01:21 +0100 Subject: [PATCH] main: specify enconding rather than converting buffer to string --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 46e688a3..56d2ef44 100644 --- a/main.js +++ b/main.js @@ -5,7 +5,7 @@ const fs = require("fs") function get_body(body) { if (body.startsWith("file://")) { body = body.replace("file://", "") - body = fs.readFileSync(body).toString() + body = fs.readFileSync(body, "utf8") } return body