Skip to content

Commit bfa2e4e

Browse files
Update Lib/_pyrepl/base_eventqueue.py
Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent 497a0bb commit bfa2e4e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/_pyrepl/base_eventqueue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def push(self, char: int | bytes | str) -> None:
7676
ord_char = char if isinstance(char, int) else ord(char)
7777
if ord_char > 255:
7878
assert isinstance(char, str)
79-
char = bytes(char.encode(self.encoding))
79+
char = bytes(char.encode(self.encoding, "replace"))
8080
self.buf.extend(char)
8181
else:
8282
char = bytes(bytearray((ord_char,)))

0 commit comments

Comments
 (0)