Comment 6 for bug 69988

Revision history for this message
Barry Warsaw (barry) wrote :

What about making this change to lib/zope/testing/doctest.py, 'round about
line 1141:

=== modified file 'src/zope/testing/doctest.py'
--- src/zope/testing/doctest.py 2006-04-11 14:08:08 +0000
+++ src/zope/testing/doctest.py 2007-09-24 20:32:49 +0000
@@ -1138,7 +1138,8 @@
         self._name2ft = {}

         # Create a fake output target for capturing doctest output.
- self._fakeout = _SpoofOut()
+ import codecs
+ self._fakeout = codecs.getwriter('utf-8')(_SpoofOut())

     #/////////////////////////////////////////////////////////////////
     # Reporting methods

This way, doctest's print goes to a utf-8 compatible 'terminal'.