From 910db869aa913f1997ed6720bff3d3419e800859 Mon Sep 17 00:00:00 2001 From: Jackson Ray Hamilton Date: Wed, 19 Sep 2018 06:51:54 -0700 Subject: [PATCH] Read wordlists with the proper encoding. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes words like “sauté” which were garbled. --- scripts/generate.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate.mjs b/scripts/generate.mjs index 2b688ba..56bab93 100644 --- a/scripts/generate.mjs +++ b/scripts/generate.mjs @@ -20,7 +20,7 @@ function processWordlist (wordlist) { function getWordlist (name, frequency) { var filePath = path.join(__dirname, '..', 'sources', name + '.' + frequency); - return processWordlist(fs.readFileSync(filePath, 'utf8')); + return processWordlist(fs.readFileSync(filePath, 'latin1')); } ['english', 'american', 'australian', 'british', 'canadian'].forEach(function (nationality) {