[XML-SIG] XML Error? (Workaround found)
Schollnick, Benjamin
Benjamin.Schollnick@usa.xerox.com
Fri, 14 Sep 2001 11:05:43 -0400
Thanks...
I've escalated this problem to the developers....
At least I now know it's not a problem with *MY* code... >g<
Thanks Again!
- Benjamin
-----Original Message-----
From: Lars Marius Garshol [mailto:larsga@garshol.priv.no]
Sent: Friday, September 14, 2001 10:16 AM
To: 'xml-sig@python.org'
Subject: Re: [XML-SIG] XML Error? (Workaround found)
* Benjamin Schollnick
|
| I'm having some problems here with some XML code...
You are running into the most common XML problem there is. Your
document is encoded in ISO 8859-1, but you fail to declare that it
does so, causing the parser to assume that you are using UTF-8 and
then choking when it discovers illegal UTF-8 byte sequences.
Change your XML declaration to
<?xml version="1.0" encoding="iso-8859-1"?>
| (<unknown>:26:38: not well-formed)
If it is at all possible we should produce a better error message than
this one.
| xml_data = string.replace (xml_data, chr(146), "")
| xml_data = string.replace (xml_data, chr(147), "")
| xml_data = string.replace (xml_data, chr(148), "")
If you are using characters in the range 128-159 you are almost
certainly using windows-1252, and not ISO 8859-1, and should change
your encoding declaration accordingly.
--Lars M.
_______________________________________________
XML-SIG maillist - XML-SIG@python.org
http://mail.python.org/mailman/listinfo/xml-sig