This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author wrohdewald
Recipients amaury.forgeotdarc, r.david.murray, wrohdewald
Date 2014-10-28.09:32:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414488756.09.0.757221108156.issue22746@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2014-10-28 09:32:36wrohdewaldsetrecipients: + wrohdewald, amaury.forgeotdarc, r.david.murray
2014-10-28 09:32:36wrohdewaldsetmessageid: <1414488756.09.0.757221108156.issue22746@psf.upfronthosting.co.za>
2014-10-28 09:32:36wrohdewaldlinkissue22746 messages
2014-10-28 09:32:36wrohdewaldcreate