kopia lustrzana https://github.com/espressif/esp-idf
idf_monitor: Fix Unicode decoding on Windows
Closes https://github.com/espressif/esp-idf/issues/2348pull/2386/head
rodzic
6de75e03ac
commit
276cba1103
|
@ -733,8 +733,10 @@ if os.name == 'nt':
|
|||
pass
|
||||
|
||||
def write(self, data):
|
||||
if type(data) is not bytes:
|
||||
data = data.encode('latin-1')
|
||||
if isinstance(data, bytes):
|
||||
data = bytearray(data)
|
||||
else:
|
||||
data = bytearray(data, 'utf-8')
|
||||
for b in data:
|
||||
b = bytes([b])
|
||||
l = len(self.matched)
|
||||
|
|
Ładowanie…
Reference in New Issue