From: XhmikosR Date: Sun, 3 May 2020 05:57:45 +0000 (+0300) Subject: Make sure we treat any readme assets as `utf-8` X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=6709f769e45f7aec947927546343ec131910c6d7;p=stevenblack-hosts.git Make sure we treat any readme assets as `utf-8` --- diff --git a/updateReadme.py b/updateReadme.py index 7300446c4..633fb0446 100644 --- a/updateReadme.py +++ b/updateReadme.py @@ -26,7 +26,7 @@ def main(): "${fmtentries} | " "[link](http://sbc.io/hosts/${location}hosts)" ) - with open(README_DATA_FILENAME, "r") as f: + with open(README_DATA_FILENAME, "r", encoding="utf-8") as f: data = json.load(f) keys = list(data.keys()) @@ -82,7 +82,7 @@ def main(): with open( os.path.join(data[key]["location"], README_FILENAME), "wt", encoding="utf-8" ) as out: - for line in open(README_TEMPLATE): + for line in open(README_TEMPLATE, encoding="utf-8"): line = line.replace( "@GEN_DATE@", time.strftime("%B %d %Y", time.gmtime()) )