Message5601

Author AndreasEK
Recipients AndreasEK
Date 2010-03-28.20:48:45
SpamBayes Score 3.8570813e-12
Marked as misclassified No
Message-id <1269809326.86.0.673392863635.issue1585@psf.upfronthosting.co.za>
In-reply-to
Content
Jython behaves differently that Python does in this respect:

C:\Dokumente und Einstellungen\aek>\Programme\Python2.6\python.exe
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
...     raise Exception(u'Flie\xdftext')
... except Exception, e:
...     print e
...
Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 4: ordinal not in range(128)
>>> try:
...     raise Exception(u'Flie\xdftext')
... except Exception, e:
...     print unicode(e)
...
Fließtext
>>>
>>> ^Z


C:\Dokumente und Einstellungen\aek>\Programme\jython2.5.1\jython.bat
Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_15
Type "help", "copyright", "credits" or "license" for more information.
>>> try:
...     raise Exception(u'Flie\xdftext')
... except Exception, e:
...     print e
...
Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 4: ordinal not in range(128)
>>> try:
...     raise Exception(u'Flie\xdftext')
... except Exception, e:
...     print unicode(e)
...
Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 4: ordinal not in range(128)
>>>
History
Date User Action Args
2010-03-28 20:48:46AndreasEKsetrecipients: + AndreasEK
2010-03-28 20:48:46AndreasEKsetmessageid: <1269809326.86.0.673392863635.issue1585@psf.upfronthosting.co.za>
2010-03-28 20:48:46AndreasEKlinkissue1585 messages
2010-03-28 20:48:45AndreasEKcreate