From: 4eadd52d <4eadd52d@gmail.com> Date: Fri, 19 May 2017 08:08:54 +0000 (+1000) Subject: Fix compile errors on some systems X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=ed5c77c4136edebfbfad3dd4588d2646979b9f3a;hp=0d1150545f04843a1fbe09f2e8f612a800aed7a8;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git Fix compile errors on some systems --- diff --git a/compile.py b/compile.py index 442ee8b..ac95273 100644 --- a/compile.py +++ b/compile.py @@ -6,7 +6,7 @@ import datetime # It removes script and style tags and replaces with the file content. -f = open('src/index.html') +f = open('src/index.html', "r", encoding="utf-8") page = f.read() f.close() @@ -18,7 +18,7 @@ scripts = scriptsFinder.findall(page) for script in scripts: filename = os.path.join("src", script) - s = open(filename) + s = open(filename, "r", encoding="utf-8") scriptContent = "" % s.read() s.close() scriptTag = """""" % script @@ -32,7 +32,7 @@ styles = stylesFinder.findall(page) for style in styles: filename = os.path.join("src", style) - s = open(filename) + s = open(filename, "r", encoding="utf-8") styleContent = "" % s.read() s.close() styleTag = """""" % style @@ -41,7 +41,7 @@ for style in styles: # Write the standalone file -f = open('bip39-standalone.html', 'w') +f = open('bip39-standalone.html', 'w', encoding="utf-8") f.write(page) f.close()