]> Devi Nivas Git - chevron.git/commit
Force utf-8 encoding when opening files
authorAkos Kiss <akiss@inf.u-szeged.hu>
Tue, 2 Oct 2018 11:31:42 +0000 (13:31 +0200)
committerAkos Kiss <akiss@inf.u-szeged.hu>
Wed, 3 Oct 2018 10:07:00 +0000 (12:07 +0200)
commit430915f81701dee7394e1e24609764711baf88ce
treeee29d73e1e55b255607b78527c7cde57413f87cb
parent8abcc371f507239c3374300e6d5cd1365aca7893
Force utf-8 encoding when opening files

The default `open(..., 'r')` may lead to errors when utf-8 encoded
files are read on a platform with non-utf-8 default locale /
preferred encoding. The `io` package allows to specify `encoding`
for `open` in a Python 2 & 3-compatible way.
chevron/main.py
chevron/renderer.py
test_spec.py