fix for utf8 characters in windows
authorSteven Tobin <steventtobin (at) gmail.com>
Mon, 19 Feb 2018 23:47:51 +0000 (23:47 +0000)
committerSteven Tobin <steventtobin (at) gmail.com>
Mon, 19 Feb 2018 23:47:51 +0000 (23:47 +0000)
xkcdpass/xkcd_password.py

index 3651000ed578529ec013aaf7f20c21d78176c74b..823b51469ec4cb73175866d35c365f624563262e 100755 (executable)
@@ -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:
git clone https://git.99rst.org/PROJECT