As Christian mentioned and as also mentioned here http://bugs.python.org/issue1293741, when error messages of nonmatching output containing extended utf-8 encoded characters are displayed, the UnicodeDecodeError occurs.
But as seen from the above example, this wasn't the case for us.
We used the 'test-ztk-zope.testing' test in Jim's branch: 'zopetoolkit/branches/jim-kgs/kgs'.
We used python 2.4.6 and python 2.6.2 on Debian and Ubuntu, and both times the test passed succesfully.
We then wanted to test with python 2.3.7 to see if it was broken there, but it seems that python 2.3 is not anymore supported by zope.testing 3.8.0, so we left it.
Has this bug perhaps been fixed upstream? Or is this perhaps related to the system locale (or some other system setting?)
We ran the test with the following locales: en_IE.UTF-8, en_US.UTF-8 and en_GB.ISO8859-1 .
Cillian de Róiste and I took a look at this at the DZUG Conf sprint.
We added the following doctest, to try and reproduce the reported bug:
------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----
>>> print u'abc'
abc
>>> print u'\xe9' .encode( 'utf-8' )
é
>>> print u'\xe9' .encode( 'utf-8' ) ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----
é
-------
We received the following output: (which seems to suggest that the bug is no longer present, or at least not reproducible by us.)
File "/home/ jc/work/ zope/zope. testing/ trunk/src/ zope/testing/ testrunner/ testrunner- unicode. txt", line 13, in testrunner- unicode. txt .encode( 'utf-8' )
Failed example:
print u'\xe9'
Expected:
é
Got:
é
As Christian mentioned and as also mentioned here http:// bugs.python. org/issue129374 1, when error messages of nonmatching output containing extended utf-8 encoded characters are displayed, the UnicodeDecodeError occurs.
But as seen from the above example, this wasn't the case for us.
We used the 'test-ztk- zope.testing' test in Jim's branch: 'zopetoolkit/ branches/ jim-kgs/ kgs'.
We used python 2.4.6 and python 2.6.2 on Debian and Ubuntu, and both times the test passed succesfully.
We then wanted to test with python 2.3.7 to see if it was broken there, but it seems that python 2.3 is not anymore supported by zope.testing 3.8.0, so we left it.
Has this bug perhaps been fixed upstream? Or is this perhaps related to the system locale (or some other system setting?)
We ran the test with the following locales: en_IE.UTF-8, en_US.UTF-8 and en_GB.ISO8859-1 .