Skip to content

Commit

Permalink
Read wordlists with the proper encoding.
Browse files Browse the repository at this point in the history
This fixes words like “sauté” which were garbled.
  • Loading branch information
jacksonrayhamilton committed Sep 19, 2018
1 parent a32a9f4 commit 910db86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/generate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 910db86

Please sign in to comment.