Ensure that the readme is written in UTF-8.
authorfunilrys <redacted>
Mon, 24 Feb 2020 17:18:17 +0000 (18:18 +0100)
committerfunilrys <redacted>
Mon, 24 Feb 2020 17:18:17 +0000 (18:18 +0100)
This patch fixes #1166.

Indeed as stated in the documentation:

> In text mode, if encoding is not specified the encoding used is platform
> dependent: locale.getpreferredencoding(False) is called to get the
> current locale encoding.

That may explain the issue mentionned in #1166.

Docs link:
  * https://docs.python.org/3/library/functions.html#open

updateReadme.py

index e936115216261c87c4f6adde3c47bc38649895e3..7300446c49d26da94b69266b7c537670b6042a18 100644 (file)
@@ -79,7 +79,9 @@ def main():
             this_row.update(source)
             source_rows += t.substitute(this_row) + "\n"
 
-        with open(os.path.join(data[key]["location"], README_FILENAME), "wt") as out:
+        with open(
+            os.path.join(data[key]["location"], README_FILENAME), "wt", encoding="utf-8"
+        ) as out:
             for line in open(README_TEMPLATE):
                 line = line.replace(
                     "@GEN_DATE@", time.strftime("%B %d %Y", time.gmtime())
git clone https://git.99rst.org/PROJECT