Access violation in Python shell

Neal Norwitz neal at
Mon Oct 21 04:58:02 CEST 2002

On Sat, 19 Oct 2002 02:22:42 -0400, David Hughes wrote:

> I wrote the following piece of code to try and clarify for myself what
> happens when Python coerces byte strings into unicode if there are bytes
> > 127 present and the default ascii encoding is set.

[ test code snipped ]

> The 8 bit character \xe2 was originally an a-circumflex. It rendered
> like a greek Tau in the Python output but ends up as a 'G' in the above
> copy.

I don't know if this is a problem or a symptom of the crash.

> Can anyone reproduce or shed any light on this problem, please, or am I
> making a public demonstration of stupidity here?

Here's a smaller test case which crashes 2.2.2 and 2.3:

	    for c in u'\xe2':
	        c in 'g\xe2teau'
	except UnicodeError:

Bug report for the crash is here:


More information about the Python-list mailing list