diff options
author | Sergey Miryanov <sergey.miryanov@gmail.com> | 2025-05-05 16:25:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-05 16:25:00 (GMT) |
commit | 0c5151bc81ec8e8588bef4389df12a9ab50e9fa0 (patch) | |
tree | ae41e635dbdbd547938b47a0938ae8050708480a /Lib/_pyrepl/windows_console.py | |
parent | d6078ed6d0cb8745460769bbb5dd2392c91c2f55 (diff) | |
download | cpython-0c5151bc81ec8e8588bef4389df12a9ab50e9fa0.zip cpython-0c5151bc81ec8e8588bef4389df12a9ab50e9fa0.tar.gz cpython-0c5151bc81ec8e8588bef4389df12a9ab50e9fa0.tar.bz2 |
gh-131878: Fix input of unicode characters with two or more code points in new pyrepl on Windows (gh-131901)
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
Diffstat (limited to 'Lib/_pyrepl/windows_console.py')
-rw-r--r-- | Lib/_pyrepl/windows_console.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/_pyrepl/windows_console.py b/Lib/_pyrepl/windows_console.py index 77985e5..587c613 100644 --- a/Lib/_pyrepl/windows_console.py +++ b/Lib/_pyrepl/windows_console.py @@ -485,7 +485,8 @@ class WindowsConsole(Console): return None elif self.__vt_support: # If virtual terminal is enabled, scanning VT sequences - self.event_queue.push(rec.Event.KeyEvent.uChar.UnicodeChar) + for char in raw_key.encode(self.event_queue.encoding, "replace"): + self.event_queue.push(char) continue if key_event.dwControlKeyState & ALT_ACTIVE: |