[issue9578] int() raises UnicodeDecodeError when called on malformed string

2010-08-12 Thread Florent Xicluna
Florent Xicluna added the comment: a duplicate of #7710 -- nosy: +flox resolution: -> duplicate status: open -> closed superseder: -> Inconsistent Exception for int() conversion ___ Python tracker ___

[issue9578] int() raises UnicodeDecodeError when called on malformed string

2010-08-12 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Interpreter Core nosy: +ezio.melotti stage: -> unit test needed type: -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 ___ Python tracker

[issue9578] int() raises UnicodeDecodeError when called on malformed string

2010-08-12 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : >>> int('\xA11') Traceback (most recent call last): File "", line 1, in UnicodeDecodeError: 'utf8' codec can't decode byte 0xa1 in position 0: invalid start byte This is inconsistent with other number types' behavior: >>> float(b'\xA1') Traceback (