eric6/Debugger/DebuggerInterfacePython.py

branch
multi_processing
changeset 7853
35dcac32984a
parent 7818
5c9271c2f662
parent 7840
9c5ffa877ce0
child 7863
6725d2549801
--- 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

eric ide

mercurial