Re: [Tutor] Encoding and XML troubles

2006-11-05 Thread Kent Johnson
William O'Higgins Witteman wrote: I've been struggling with encodings in my XML input to Python programs. Here's the situation - my program has no declared encoding, so it defaults to ASCII. It's written in Unicode, but apparently that isn't confusing to the parser. Fine by me. I import

Re: [Tutor] Encoding and XML troubles

2006-11-05 Thread Dustin J. Mitchell
For what it's worth, the vast majority of the XML out there (especially if you're parsing RSS feeds, etc.) is written by monkeys and is totally ill-formed. It seems the days of 'it looked OK in my browser' are still here. To find out if it's your app or the XML, you could try running the XML

[Tutor] Encoding and XML troubles

2006-11-04 Thread William O'Higgins Witteman
I've been struggling with encodings in my XML input to Python programs. Here's the situation - my program has no declared encoding, so it defaults to ASCII. It's written in Unicode, but apparently that isn't confusing to the parser. Fine by me. I import some XML, probably encoded in the

Re: [Tutor] Encoding and XML troubles

2006-11-04 Thread Luke Paireepinart
Inputting XML into a Python program has nothing to do with what encoding the python source is in.So it seems to me that that particular PEP doesn't apply in this case at all.I'm guessing that the ElementTree module has an option to use Unicode input.