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 terry.reedy
Recipients akaihola, babilen, bjoti, christoph, eric.araujo, luciano, ogrisel, rbp, terry.reedy, tim.peters
Date 2010-08-03.23:53:45
SpamBayes Score 1.5814685e-08
Marked as misclassified No
Message-id <1280879628.34.0.91189816104.issue1293741@psf.upfronthosting.co.za>
In-reply-to
Content
OP: "The doctest module fails when the expected result
string has non-ascii charcaters even if the # -*-
coding: XXX -*- line is properly set."

I believe the claim in msg70907 of #2811 is correct: the file encoding only affects the conversion of *unicode* literals to unicode objects. It does not affect the conversion of byte literals to byte string objects. Nor does it affect the later interpretation of byte strings by testmod. As msg26299 also says, make the doctstring a unicode, not byte string, to have the encoding cookie take effect. So the original bug claim is invalid.

That aside, the issue was fixed in 3.0 by making text be unicode.
Seriously, issues like this were part of the motivation for 3.0.

That aside, test modules are not revised in bugfix releases without severe reason.

Closing for all these reasons: invalid, out-of-date, fixed; take one's pick.
History
Date User Action Args
2010-08-03 23:53:48terry.reedysetrecipients: + terry.reedy, tim.peters, ogrisel, bjoti, akaihola, rbp, luciano, christoph, eric.araujo, babilen
2010-08-03 23:53:48terry.reedysetmessageid: <1280879628.34.0.91189816104.issue1293741@psf.upfronthosting.co.za>
2010-08-03 23:53:47terry.reedylinkissue1293741 messages
2010-08-03 23:53:46terry.reedycreate