mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 19:54:32 +02:00
Merge branch 'bugfix/monitor_win_encoding' into 'master'
idf_monitor: Fix Unicode decoding on Windows See merge request idf/esp-idf!3157
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user