Merge pull request #105 from cmrn/bug/100
fixed #100 by explictly setting encoding (credit to breunigs)
This commit is contained in:
4
build.py
4
build.py
@ -4,7 +4,7 @@ import glob
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
def readfile(fn):
|
def readfile(fn):
|
||||||
with open(fn, 'Ur') as f:
|
with open(fn, 'Ur', encoding='utf8') as f:
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
c = '\n\n'.join(map(readfile, glob.glob('code/*')))
|
c = '\n\n'.join(map(readfile, glob.glob('code/*')))
|
||||||
@ -14,7 +14,7 @@ m = m.split('@@INJECTHERE@@')
|
|||||||
m.insert(1, c)
|
m.insert(1, c)
|
||||||
t = '\n\n'.join(m)
|
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)
|
f.write(t)
|
||||||
|
|
||||||
# vim: ai si ts=4 sw=4 sts=4 et
|
# vim: ai si ts=4 sw=4 sts=4 et
|
||||||
|
Reference in New Issue
Block a user