Partial victory (was RE: [Python-Dev] RE: test_sax failing (Windows))

Christian Tismer tismer@tismer.com
2001年1月22日 15:03:25 +0100


Christian Tismer wrote:
>> Maybe I can help.

...
...
> I will now try to create a minimized script and XML data that
> produces the above again.
>> back in an hour - chris

Here we go.
The following session produces the mentioned UTF8 error:
>>> txt = "<master desc='blah325円weird' />"
>>> def startelt(name, dic):
... 	print name, dic
... 	
>>> p=expat.ParserCreate()
>>> p.StartElementHandler = startelt
>>> p.Parse(txt)
Traceback (innermost last):
 File "<interactive input>", line 1, in ?
UnicodeError: UTF-8 decoding error: invalid data
Behavior depends of the ASCII code.
>From code 128 (0200) to 191 (0277) the parser gives an
not well-formed exception, as it should be.
The codes from 192 to 236, 238-243 produce
"UTF-8 decoding error: invalid data",
the rest gives "not well-formed".
I would like to know if this happens with your (Tim) modified
version as well. I'm using plain vanilla BeOpen Python 2.0 .
cheers - chris
-- 
Christian Tismer :^) <mailto:tismer@tismer.com>
Mission Impossible 5oftware : Have a break! Take a ride on Python's
Kaunstr. 26 : *Starship* http://starship.python.net
14163 Berlin : PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF
 where do you want to jump today? http://www.stackless.com

AltStyle によって変換されたページ (->オリジナル) /