From 3d83ce6d7ac7c2e38aca0767f906e8a1c50aa619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Mich=C3=A1lek?= Date: Thu, 25 Feb 2021 18:09:48 +0100 Subject: [PATCH] tools: handle exception in case of logging Unicode characters --- tools/idf_monitor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/idf_monitor.py b/tools/idf_monitor.py index 8cc95afc47..1f6e2df693 100755 --- a/tools/idf_monitor.py +++ b/tools/idf_monitor.py @@ -824,6 +824,9 @@ if os.name == 'nt': # an exception (however, the character is still written to the screen) # Ref https://github.com/espressif/esp-idf/issues/1136 pass + except UnicodeDecodeError: + # In case of double byte Unicode characters display '?' + self.output.write('?') def write(self, data): if isinstance(data, bytes):