[Python-bugs-list] [ python-Bugs-529104 ] broken error handling in unicode-escape
noreply@sourceforge.net
noreply@sourceforge.net
Sat, 16 Mar 2002 09:43:05 -0800
Bugs item #529104, was opened at 2002-03-12 20:37
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=529104&group_id=5470
Category: Unicode
>Group: Python 2.2.1 candidate
Status: Open
Resolution: None
Priority: 5
Submitted By: Walter Dörwald (doerwalter)
Assigned to: M.-A. Lemburg (lemburg)
Summary: broken error handling in unicode-escape
Initial Comment:
Error handling for decoding unicode-escape encoded
string seems the be slightly broken:
Python 2.2 (#2, Mar 1 2002, 17:32:59)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on
linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> "\N{foo}xx".decode("unicode-
escape", "ignore")
u'\x08xx'
>>> "\".decode("unicode-escape")
u'\\U082a74f8'
----------------------------------------------------------------------
>Comment By: Michael Hudson (mwh)
Date: 2002-03-16 17:43
Message:
Logged In: YES
user_id=6656
Agree that looks nasty. Any chance of a quick fix from Marc
or Martin?
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=529104&group_id=5470