community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1704037 - /comdev/projects.apache.org/scripts/import/parseprojects.py
Date Sat, 19 Sep 2015 14:15:01 GMT
Author: sebb
Date: Sat Sep 19 14:15:00 2015
New Revision: 1704037

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

Modified:
    comdev/projects.apache.org/scripts/import/parseprojects.py

Modified: comdev/projects.apache.org/scripts/import/parseprojects.py
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/scripts/import/parseprojects.py?rev=1704037&r1=1704036&r2=1704037&view=diff
==============================================================================
--- comdev/projects.apache.org/scripts/import/parseprojects.py (original)
+++ comdev/projects.apache.org/scripts/import/parseprojects.py Sat Sep 19 14:15:00 2015
@@ -198,8 +198,8 @@ for s in itemlist :
             #for e in add:
             #    pjson[e] = add[e]
             print("Writing projects/%-40s + copying source DOAP to doap/%s/%s.rdf..." % (projectJsonFilename+".json",
committeeId, projectJsonFilename))
-            with open ("../../site/json/projects/%s.json" % projectJsonFilename, "w") as
f:
-                json.dump(pjson, f, sort_keys=True, indent=0)
+            with open ("../../site/json/projects/%s.json" % projectJsonFilename, "w", encoding='utf-8')
as f:
+                json.dump(pjson, f, sort_keys=True, indent=0, ensure_ascii=False)
                 f.close()
             # copy project DOAP to /doap/<committee id>/<project id>.rdf
             with open ("../../site/doap/%s/%s.rdf" % (committeeId, projectJsonFilename),
"wb") as f:
@@ -220,8 +220,8 @@ for s in itemlist :
 
 if save:
     print("Writing foundation/projects.json...")
-    with open ("../../site/json/foundation/projects.json", "w") as f:
-        json.dump(projects, f, sort_keys=True, indent=0)
+    with open ("../../site/json/foundation/projects.json", "w", encoding='utf-8') as f:
+        json.dump(projects, f, sort_keys=True, indent=0, ensure_ascii=False)
         f.close()
 
 if len(failures) > 0:



Mime
View raw message