community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1704022 - /comdev/projects.apache.org/scripts/cronjobs/parsecommitters.py
Date Sat, 19 Sep 2015 13:21:49 GMT
Author: sebb
Date: Sat Sep 19 13:21:49 2015
New Revision: 1704022

URL: http://svn.apache.org/viewvc?rev=1704022&view=rev
Log:
Let's use UTF-8

Modified:
    comdev/projects.apache.org/scripts/cronjobs/parsecommitters.py

Modified: comdev/projects.apache.org/scripts/cronjobs/parsecommitters.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/cronjobs/parsecommitters.py?rev=1704022&r1=1704021&r2=1704022&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/cronjobs/parsecommitters.py (original)
+++ comdev/projects.apache.org/scripts/cronjobs/parsecommitters.py Sat Sep 19 13:21:49 2015
@@ -41,19 +41,20 @@ for committer in re.findall(r"<tr>([\S\s
         }
         people_name[cid] = cname
 
+# Use utf-8 encoding for the file contents
 print("Writing people.json")
-with open("../../site/json/foundation/people.json", "w") as f:
-    json.dump(people, f, sort_keys=True, indent=0)
+with open("../../site/json/foundation/people.json", "w", encoding='utf-8') as f:
+    json.dump(people, f, sort_keys=True, indent=0, ensure_ascii=False)
     f.close()
 
 print("Writing people_name.json")
-with open("../../site/json/foundation/people_name.json", "w") as f:
-    json.dump(people_name, f, sort_keys=True, indent=0)
+with open("../../site/json/foundation/people_name.json", "w", encoding='utf-8') as f:
+    json.dump(people_name, f, sort_keys=True, indent=0, ensure_ascii=False)
     f.close()
 
 print("Writing groups.json")
-with open("../../site/json/foundation/groups.json", "w") as f:
-    json.dump(groups, f, sort_keys=True, indent=0)
+with open("../../site/json/foundation/groups.json", "w", encoding='utf-8') as f:
+    json.dump(groups, f, sort_keys=True, indent=0, ensure_ascii=False)
     f.close()
 
 print("All done!")
\ No newline at end of file



Mime
View raw message