Allow the bot to parse lines containing invalid Unicode

master
luk3yx 2018-09-24 09:37:08 +12:00
parent 45b28fb98f
commit 1b25d76ced
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ class IRC:
raw = raw.replace(b'\r', b'\n').split(b'\n')
for line in raw:
try:
line = line.decode('utf-8')
line = line.decode('utf-8', errors = 'replace')
except UnicodeDecodeError:
self.debug('Bad line:', line)
line = ''