diff --git a/valve/rcon.py b/valve/rcon.py index ccd808f..39fd0a2 100644 --- a/valve/rcon.py +++ b/valve/rcon.py @@ -139,7 +139,7 @@ def text(self, text): :raises UnicodeEncodeError: if the string cannot be encoded as ASCII. """ - self.body = text.encode(self.ENCODING) + self.body = text.encode(encoding=self.ENCODING, errors='ignore') def encode(self): """Encode message to a bytestring."""