Wolfgang Rohdewald added the comment:

> What about
>  open(..., encoding='latin-1', errors='xmlcharrefreplace')

That works fine. I tested with a chinese character 与

But I do not think the application should work around something that cgitb is 
supposed to handle. More so since the documentation is dead silent about this. 
You need to use codecs.open instead of open and add those kw arguments. As long 
as this is not explained in the documentation, I guess it is a bug for everyone 
not using latin-1.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22746>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to