diff options
author | Jose <jose@zeroc.com> | 2016-04-28 17:01:06 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-04-28 17:45:10 +0200 |
commit | 68032fbc4aeac72b2ba064c42444139db9080d0a (patch) | |
tree | 2354359c62c06bc72851d2cab24d463ffe82ba99 /cpp/src | |
parent | Fix to no longer close the socket on fdToString failure, the caller is now cl... (diff) | |
download | ice-68032fbc4aeac72b2ba064c42444139db9080d0a.tar.bz2 ice-68032fbc4aeac72b2ba064c42444139db9080d0a.tar.xz ice-68032fbc4aeac72b2ba064c42444139db9080d0a.zip |
Add encoding comments to python generated code
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Slice/Python.cpp | 4 |
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", "#"); // |