summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/Python.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-05-09 23:03:21 +0200
committerJose <jose@zeroc.com>2016-05-09 23:03:21 +0200
commit3e685a12bfd92a4ffd86c808ba0f34df907de5c8 (patch)
tree2ef8fb8e028d4f14d1516a98f2a18dbadb46a5d7 /cpp/src/Slice/Python.cpp
parentUpdate to latest gradle builder (diff)
parentAIX port (diff)
downloadice-3e685a12bfd92a4ffd86c808ba0f34df907de5c8.tar.bz2
ice-3e685a12bfd92a4ffd86c808ba0f34df907de5c8.tar.xz
ice-3e685a12bfd92a4ffd86c808ba0f34df907de5c8.zip
Merge remote-tracking branch 'origin/3.6'
Diffstat (limited to 'cpp/src/Slice/Python.cpp')
-rw-r--r--cpp/src/Slice/Python.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpp/src/Slice/Python.cpp b/cpp/src/Slice/Python.cpp
index 09a17a93b4a..4343456efb2 100644
--- a/cpp/src/Slice/Python.cpp
+++ b/cpp/src/Slice/Python.cpp
@@ -665,6 +665,10 @@ Slice::Python::compile(int argc, char* argv[])
}
FileTracker::instance()->addFile(file);
+ //
+ // Python magic comment to set the file encoding, it must be first or second line
+ //
+ out << "# -*- coding: utf-8 -*-\n";
printHeader(out);
printGeneratedHeader(out, base + ".ice", "#");
//