tools: handle exception in case of logging Unicode characters

This commit is contained in:
Juraj Michálek
2021-02-25 18:09:48 +01:00
parent 08ce445ab6
commit 0b0364c719

View File

@@ -764,6 +764,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):