From b108b74fa454cca6c801e216de7d79ab3fc6bf85 Mon Sep 17 00:00:00 2001 From: gardenapple Date: Wed, 22 Dec 2021 18:22:57 +0200 Subject: [PATCH] Suggest UTF-8 when decoding local files, (workaround) fixes #9 --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 976e3e0..e4726b0 100755 --- a/index.js +++ b/index.js @@ -369,7 +369,9 @@ if (inputIsFromStdin) { }); } else if (inputFile) { promiseGetHTML = jsdom.JSDOM.fromFile(inputFile, { - url: documentURL + url: documentURL, + // workaround for https://gitlab.com/gardenappl/readability-cli/-/issues/9 + contentType: "text/html; charset=utf-8" }); }