I came across obscure problem when raised Python exception got printed to win console. When exception message contains any unicode literal it is not printed at all or is printed improperly. Console encoding is cp866
When python default encoding is ascii.
raise LookupError(u"symbol: \u0411")
Gets printed as:
LookupError
When I set default encoding to utf-8 I get
LookupError: symbol: ╨С
When I do
print u"symbol: \u0411"
In both cases I get:
symbol: Б
Why there is that difference in the behaviour? What should I do to do things right?