1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

fix "".encode("utf8") for unicode input

This commit is contained in:
urlbot
2014-08-20 18:34:23 +02:00
parent e2149dc6d6
commit 23d467dcb4

View File

@@ -98,7 +98,7 @@ def chat_write(message, prefix='/say '):
# which seems to make both unicode() and ''.encode('utf8') fail. # which seems to make both unicode() and ''.encode('utf8') fail.
try: try:
msg = unicode(prefix) + unicode(message) + '\n' msg = unicode(prefix) + unicode(message) + '\n'
msg.encode('utf8') msg = msg.encode('utf8')
except UnicodeDecodeError: except UnicodeDecodeError:
msg = prefix + message + '\n' msg = prefix + message + '\n'