소스 검색

Forcing UTF-8 when reading files

- I blame Ubuntu...
- Can't the world just get along and UTF-8 already?
master
Jacob Alexander 8 년 전
부모
커밋
6135cbb832
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      kll.py

+ 1
- 1
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 )