--- a/eric6/Debugger/DebuggerInterfacePython.py Fri Nov 27 18:02:03 2020 +0100 +++ b/eric6/Debugger/DebuggerInterfacePython.py Sun Nov 29 11:16:08 2020 +0100 @@ -12,7 +12,7 @@ import logging from PyQt5.QtCore import ( - QObject, QTextCodec, QProcess, QProcessEnvironment, QTimer + QObject, QProcess, QProcessEnvironment, QTimer ) from PyQt5.QtWidgets import QInputDialog @@ -63,9 +63,6 @@ # set translation function self.translate = self.__identityTranslation - self.codec = QTextCodec.codecForName( - str(Preferences.getSystem("StringEncoding"))) - if passive: # set translation function if Preferences.getDebugger("PathTranslation"): @@ -1038,10 +1035,8 @@ """ while self.qsock and self.qsock.canReadLine(): qs = self.qsock.readLine() - if self.codec is not None: - line = self.codec.toUnicode(qs) - else: - line = bytes(qs).decode() + line = bytes(qs).decode( + encoding=Preferences.getSystem("StringEncoding")) logging.debug("<Debug-Server> %s", line) ## print("Server: ", line) ##debug