fixed #100 by explictly setting encoding (credit to breunigs)

This commit is contained in:
Cameron Moon
2013-02-11 19:24:41 +11:00
parent 543fc5ce5b
commit 81ed7e279c

View File

@ -4,7 +4,7 @@ import glob
import time
def readfile(fn):
with open(fn, 'Ur') as f:
with open(fn, 'Ur', encoding='utf8') as f:
return f.read()
c = '\n\n'.join(map(readfile, glob.glob('code/*')))
@ -14,7 +14,7 @@ m = m.split('@@INJECTHERE@@')
m.insert(1, c)
t = '\n\n'.join(m)
with open('total-conversion-build.user.js', 'w') as f:
with open('total-conversion-build.user.js', 'w', encoding='utf8') as f:
f.write(t)
# vim: ai si ts=4 sw=4 sts=4 et