diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-01-04 11:15:00 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-01-04 16:37:05 +0900 |
| commit | d31a084fc83d47eef6c6eb3aac76989da9692853 (patch) | |
| tree | 2a412325bd788cd505bb5cdad90ac498a004e405 /pyuic3/uic.cpp | |
| parent | 30954661009ddfb9db2e9daed3bfbd594bb20441 (diff) | |
| download | pytqt-d31a084f.tar.gz pytqt-d31a084f.zip | |
Use utf8 instead of latin1/ascii as default. Address pyuic compatibility with python3.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'pyuic3/uic.cpp')
| -rw-r--r-- | pyuic3/uic.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pyuic3/uic.cpp b/pyuic3/uic.cpp index ac6af9b..8d0613c 100644 --- a/pyuic3/uic.cpp +++ b/pyuic3/uic.cpp @@ -249,7 +249,7 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream, out << "\n"; out << indent << "def __tr(self,s,c = None):\n"; ++indent; - out << indent << "return tqApp.translate(\"" << nameOfClass << "\",s,c)\n"; + out << indent << "return tqApp.translate(b\"" << nameOfClass << "\",s.encode(),c)\n"; --indent; } @@ -258,7 +258,7 @@ Uic::Uic( const TQString &fn, const char *outputFn, TQTextStream &outStream, out << "\n"; out << indent << "def __trUtf8(self,s,c = None):\n"; ++indent; - out << indent << "return tqApp.translate(\"" << nameOfClass << "\",s,c,TQApplication.UnicodeUTF8)\n"; + out << indent << "return tqApp.translate(b\"" << nameOfClass << "\",s.encode(),c,TQApplication.UnicodeUTF8)\n"; --indent; } |
