[issue22746] cgitb html: wrong encoding for utf-8

Wolfgang Rohdewald report at bugs.python.org
Tue Oct 28 17:01:17 CET 2014


Wolfgang Rohdewald added the comment:

> > You need to use codecs.open instead of open
> No, why? in python3 open() supports the errors handler.

right, but not in python2 which has the same problem. I need my code to run with both.

> Do you have a use case for xmlcharrefreplace in the HTML context?

No, my only use case is the local file.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22746>
_______________________________________


More information about the Python-bugs-list mailing list