[caribou] tools: Assume 'UTF-8' for the output schema file
- From: Daiki Ueno <dueno src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [caribou] tools: Assume 'UTF-8' for the output schema file
- Date: Mon, 20 Feb 2017 10:17:24 +0000 (UTC)
commit e5375dc19f2ca404e1c70081ac6eea4c5119460b
Author: Daiki Ueno <dueno src gnome org>
Date: Mon Feb 20 11:15:40 2017 +0100
tools: Assume 'UTF-8' for the output schema file
tools/make_schema.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tools/make_schema.py b/tools/make_schema.py
index 2d409f7..84665d6 100755
--- a/tools/make_schema.py
+++ b/tools/make_schema.py
@@ -2,7 +2,7 @@
import xml.dom.minidom
-import os, sys
+import io, os, sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from caribou.settings import caribou_settings
@@ -21,7 +21,7 @@ class SchemasMaker:
schemafile.appendChild(schema)
self._create_schema(self.settings, doc, schema)
- fp = open(output, 'w')
+ fp = io.open(output, 'w', encoding='UTF-8')
self._pretty_xml(fp, schemafile)
fp.close()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]