From: DarkContact Date: Tue, 19 Nov 2019 19:09:03 +0000 (+0300) Subject: fix encoding X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=b4b3ada4c02de8866cde75894126fd46c3648c8b;p=blog.git fix encoding --- diff --git a/css/postprocess.py b/css/postprocess.py index 4017f34e..5aee41a3 100755 --- a/css/postprocess.py +++ b/css/postprocess.py @@ -164,14 +164,14 @@ def postprocess(files, process_imports, out_file): """.format(' '.join(sys.argv[1:]))) # Parse the top-level file - with open(files[0]) as f: parse(f) + with open(files[0], encoding='utf8') as f: parse(f) # Now open the imported files and parse them as well. Not doing any # recursive parsing. for i, file in enumerate(imported_files + files[1:]): if i: out.write('\n') - with open(file) as f: parse(f) + with open(file, encoding='utf8') as f: parse(f) return 0