src/eric7/MicroPython/MicroPythonReplWidget.py

branch
eric7
changeset 11055
e68bcb2b5ec1
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
--- a/src/eric7/MicroPython/MicroPythonReplWidget.py	Tue Nov 26 17:07:48 2024 +0100
+++ b/src/eric7/MicroPython/MicroPythonReplWidget.py	Tue Nov 26 19:46:36 2024 +0100
@@ -576,7 +576,10 @@
                     length = 2
                 else:
                     length = 1
-                txt = data[index : index + length].decode("utf8")
+                try:
+                    txt = data[index : index + length].decode("utf8")
+                except UnicodeDecodeError:
+                    txt = data[index : index + length].decode("iso8859-1")
                 index += length - 1  # one more is done at the end
                 self.insertPlainText(txt)
 

eric ide

mercurial