Message1936

Author cgroves
Recipients
Date 2007-09-27.04:42:28
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Without a patch in hand and a good understanding of the problem, I think this is too big of a change to attempt between release candidates.  Even Philip's explanation below isn't complete because if CPython were just using unicode_escape on the printed objects, your final assert would fail.  sys.stdout.getvalue() would have a str object in it which isn't equal to the unicode object from above.  It definitely passes though.  While 2.2.1 is too far along to fix this, I wouldn't mind making a 2.2.2 for this and whatever else comes up.  

That said, as long as you're not relying on unicode objects coming out of getvalue(which I don't think could be the case since that wouldn't have happened under 2.2 either), you might be able to get around this by setting the default encoding.  The reason it's complaining about ascii is because ascii is the default default encoding.  You can change that to any encoding supported by Jython in your site.py, and then whenever Jython attempts to turn a unicode object into a str without an explict encoding, it'll use that encoding to do the work.  It works the same in the opposite direction when decoding a str into a unicode object without an explicit encoding.
History
Date User Action Args
2008-02-20 17:18:03adminlinkissue1802339 messages
2008-02-20 17:18:03admincreate