twisted.python.log can't encode unicode correctly
|Reported by:||victorlin||Owned by:|
I encounter a problem. Once I send unicode message to log.msg or stdout (replaced by a proxy class), I got a UnicodeEncodeError: 'ascii' error. I try to use the patch in ticket #1990, but it does not work. There is no problem to display unicode in console of pydev (a python plug of eclipse), but it throw unicode encode exception in cmd of windows. I think the problem is that it should encode the unicode with 'cp950' on my computer's console environment, but it try to encode everything to 'ascii'. Could you fix this problem? My program Can't work around because this encoding problem. Thanks.
# this is the code to show the problem
# I have no idea does this problem occur in ascii environment
# But it occurs on my computer : Traditional Chinese Windows's cmd
from twisted.python import log
from twisted.python.logfile import DailyLogFile