Message5602

Author pekka.klarck
Recipients AndreasEK, pekka.klarck
Date 2010-03-28.21:33:00
SpamBayes Score 2.2340718e-09
Marked as misclassified No
Message-id <1269811980.89.0.916654683721.issue1585@psf.upfronthosting.co.za>
In-reply-to
Content
This is probably the easiest way to reproduce this:
>>> unicode(Exception(u'\xe4'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in position 0: ordinal not in range(128)

Interestingly this works:
>>> unicode(Exception(u'\xe4').args[0])
u'\xe4'

I used Jython 2.5.1 to test this. With Python 2.6.2 both of the above examples return u'\xe4' as expected.
History
Date User Action Args
2010-03-28 21:33:00pekka.klarcksetmessageid: <1269811980.89.0.916654683721.issue1585@psf.upfronthosting.co.za>
2010-03-28 21:33:00pekka.klarcksetrecipients: + pekka.klarck, AndreasEK
2010-03-28 21:33:00pekka.klarcklinkissue1585 messages
2010-03-28 21:33:00pekka.klarckcreate