[XML-SIG] XML Error? (Workaround found)
Lars Marius Garshol
larsga@garshol.priv.no
14 Sep 2001 16:16:14 +0200
* 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.