Open cloverstd opened 10 years ago
Please clarify: have you removed the str() type casting/encoding from the line 146?
@leporo No, I have not modified the source of tornado-redis. You can test a Chinese charater like u"你好"(means hello) or u'\u4f60\u597d'.
Could you please try the current master branch? Does it work for you?
Hi, I am writing a realtime web application with
SockJSSubscriber
. When I send a unicode string that exceed ASCII's coding range, like Chinese character, there will raiseUnicodeEncodeError
Exception on 'tornadoredis/pubsub.py", line 146, in on_message'.[Solutions] I inherit a SockJSSubscriber and overwrite the on_message to encode the
msg.body
to str, and it work well.