summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-04-28 17:01:06 +0200
committerJose <jose@zeroc.com>2016-04-28 17:01:06 +0200
commitb12ac29b8c62f112b8db92f5fa25f252f728d7cd (patch)
tree28c64e4232eae35f7d6a5007c6eb85faa0e0c520 /python
parentFixed issue with IE where accessing the stack from Exception.toString leads t... (diff)
downloadice-3.6.2.1-python.tar.bz2
ice-3.6.2.1-python.tar.xz
ice-3.6.2.1-python.zip
Add encoding comments to python generated codev3.6.2.1-python
Diffstat (limited to 'python')
-rw-r--r--python/modules/IcePy/Slice.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/modules/IcePy/Slice.cpp b/python/modules/IcePy/Slice.cpp
index bf856f8b654..a4692f6465f 100644
--- a/python/modules/IcePy/Slice.cpp
+++ b/python/modules/IcePy/Slice.cpp
@@ -161,6 +161,10 @@ IcePy_loadSlice(PyObject* /*self*/, PyObject* args)
ostringstream codeStream;
IceUtilInternal::Output out(codeStream);
out.setUseTab(false);
+ //
+ // Python magic comment to set the file encoding, it must be first or second line
+ //
+ out << "# -*- coding: utf-8 -*-\n";
generate(u, all, checksum, includePaths, out);
u->destroy();