summaryrefslogtreecommitdiffstats
path: root/Utilities/Sphinx
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/Sphinx')
-rwxr-xr-xUtilities/Sphinx/create_identifiers.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Utilities/Sphinx/create_identifiers.py b/Utilities/Sphinx/create_identifiers.py
index f3dbbcc..e35f127 100755
--- a/Utilities/Sphinx/create_identifiers.py
+++ b/Utilities/Sphinx/create_identifiers.py
@@ -6,12 +6,12 @@ if len(sys.argv) != 2:
sys.exit(-1)
name = sys.argv[1] + "/CMake.qhp"
-f = open(name)
+f = open(name, "rb")
if not f:
sys.exit(-1)
-lines = f.read().splitlines()
+lines = f.read().decode("utf-8").splitlines()
if not lines:
sys.exit(-1)
@@ -46,5 +46,5 @@ for line in lines:
line = part1 + prefix + "id=\"" + domain_object_type + "/" + domain_object + "\" " + part2
newlines.append(line + "\n")
-f = open(name, "w")
-f.writelines(newlines)
+f = open(name, "wb")
+f.writelines(map(lambda line: line.encode("utf-8"), newlines))