]> git.donarmstrong.com Git - kiibohd-kll.git/commitdiff
Forcing UTF-8 when reading files
authorJacob Alexander <haata@kiibohd.com>
Mon, 9 May 2016 06:25:11 +0000 (23:25 -0700)
committerJacob Alexander <haata@kiibohd.com>
Mon, 9 May 2016 06:25:11 +0000 (23:25 -0700)
- I blame Ubuntu...
- Can't the world just get along and UTF-8 already?

kll.py

diff --git a/kll.py b/kll.py
index 61fda0c06c4558a271ebcc5f44ad412b16f8ee42..1ad024496bf7f1563978dbf85f5d2c40222caffa 100755 (executable)
--- a/kll.py
+++ b/kll.py
@@ -691,7 +691,7 @@ def parse( tokenSequence ):
 
 
 def processKLLFile( filename ):
-       with open( filename ) as file:
+       with open( filename, encoding='utf-8' ) as file:
                data = file.read()
                try:
                        tokenSequence = tokenize( data )