From: Jacob Alexander Date: Mon, 9 May 2016 06:25:11 +0000 (-0700) Subject: Forcing UTF-8 when reading files X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6135cbb8329eff480c4100a1b46557f690ea604b;p=kiibohd-kll.git Forcing UTF-8 when reading files - I blame Ubuntu... - Can't the world just get along and UTF-8 already? --- diff --git a/kll.py b/kll.py index 61fda0c..1ad0244 100755 --- 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 )