From 6c4b3954aa0fde78e835e313167603b774e53289 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 13 Mar 2022 19:03:23 +0100 Subject: [PATCH] urwid windows: use utf8 --- mitmproxy/contrib/urwid/raw_display.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy/contrib/urwid/raw_display.py b/mitmproxy/contrib/urwid/raw_display.py index 337c63df6..8a0aaa451 100644 --- a/mitmproxy/contrib/urwid/raw_display.py +++ b/mitmproxy/contrib/urwid/raw_display.py @@ -1168,7 +1168,7 @@ class ReadInputThread(threading.Thread): if inp.EventType == win32.EventType.KEY_EVENT: if not inp.Event.KeyEvent.bKeyDown: continue - self._input.send(inp.Event.KeyEvent.uChar.AsciiChar) + self._input.send(inp.Event.KeyEvent.uChar.UnicodeChar.encode("utf8")) elif inp.EventType == win32.EventType.WINDOW_BUFFER_SIZE_EVENT: self._resize() else: