From 5d70367bfce4859978ed0e16a2b97ffa7c29d115 Mon Sep 17 00:00:00 2001 From: timmahrt Date: Wed, 29 Jun 2016 23:58:38 +0200 Subject: [PATCH] BUGFIX: OS X default encoding with io.open is whack I'm changing everything to utf-8 --- pysle/isletool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysle/isletool.py b/pysle/isletool.py index c10a304..1b7bdf2 100644 --- a/pysle/isletool.py +++ b/pysle/isletool.py @@ -31,7 +31,7 @@ class LexicalTool(): Builds the isle textfile into a dictionary for fast searching ''' lexDict = {} - with io.open(self.islePath, "r") as fd: + with io.open(self.islePath, "r", encoding='utf-8') as fd: wordList = [line.rstrip('\n') for line in fd] for row in wordList: