[Python-bugs-list] [ python-Bugs-610783 ] Lone surrogates cause bad .pyc files
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 17 Sep 2002 13:47:54 -0700
Bugs item #610783, was opened at 2002-09-17 16:47
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=610783&group_id=5470
Category: Unicode
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Guido van Rossum (gvanrossum)
Assigned to: M.-A. Lemburg (lemburg)
Summary: Lone surrogates cause bad .pyc files
Initial Comment:
A Unicode literal in a .py file containing a lone
surrogate will cause a .pyc file to be written that
causes an exception in the UTF-8 decoder when it is loaded.
This is fixed in 2.3 but a fix is needed for 2.2 that
doesn't require the magic number to be changed.
A solution appears to be a UTF-8 decoder that accepts
the correct *and* the malformed version for such
Unicode strings.
(See python-dev discussion, subject "utf8 issue" in
Aug/Sep 2002.)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=610783&group_id=5470