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:
@@ -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'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user