diff -r d0e9c4cb2aa0 -r 35dcac32984a eric6/Debugger/DebuggerInterfacePython.py --- a/eric6/Debugger/DebuggerInterfacePython.py Sat Oct 31 12:19:44 2020 +0100 +++ b/eric6/Debugger/DebuggerInterfacePython.py Sat Dec 05 18:02:17 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 @@ -66,9 +66,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"): @@ -1327,10 +1324,8 @@ """ while sock and sock.canReadLine(): qs = sock.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