From: Steven Tobin Date: Mon, 19 Feb 2018 23:47:51 +0000 (+0000) Subject: fix for utf8 characters in windows X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=619e57434709e04b98517528e0a434fccef34bbe;p=redacted-XKCD-password-generator.git fix for utf8 characters in windows --- diff --git a/xkcdpass/xkcd_password.py b/xkcdpass/xkcd_password.py index 3651000..823b514 100755 --- a/xkcdpass/xkcd_password.py +++ b/xkcdpass/xkcd_password.py @@ -126,7 +126,7 @@ def generate_wordlist(wordfile=None, min_length, max_length)) # read words from file into wordlist - with open(wordfile) as wlf: + with open(wordfile, encoding='utf-8') as wlf: for line in wlf: thisword = line.strip() if regexp.match(thisword) is not None: