Issue1368

classification
Title: '\xe4'.decode('utf-8') does not raise UnicodeDecodeError but returns u''
Type: behaviour Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pjenvey Nosy List: Christof, pjenvey
Priority: Keywords:

Created on 2009-06-06.19:24:08 by Christof, last changed 2009-06-06.20:50:47 by pjenvey.

Messages
msg4800 (view) Author: Christof (Christof) Date: 2009-06-06.19:24:07
I think I read about a similar problem before but could not find
anything in particular (sorry if this is a known behaviour), but:

Jython (2.5rc3)
>>> '\xe4'.decode('utf-8')
u''

Python 
>>> '\xe4'.decode('utf-8')
...
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe4 in position 0:
unexpected end of data

The same for example for '1'.decode('utf-16') which does raise in Python
but simple returns u'' in Jython.

Is there any way this might change or work around this incompatibility?
I have problems running all my tests. 

Thanks a lot!
msg4803 (view) Author: Philip Jenvey (pjenvey) Date: 2009-06-06.20:50:47
fixed in r6460, thanks
History
Date User Action Args
2009-06-06 20:50:47pjenveysetstatus: open -> closed
resolution: fixed
messages: + msg4803
2009-06-06 20:04:19pjenveysetassignee: pjenvey
nosy: + pjenvey
2009-06-06 19:24:08Christofcreate