diff options
Diffstat (limited to 'python/modules')
-rw-r--r-- | python/modules/IcePy/Slice.cpp | 4 |
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(); |