[XML-SIG] Re: Bug in ElementTree (or in my xml file )?
fredrik at pythonware.com
Mon Apr 18 13:20:37 CEST 2005
lienard.bruno at free.fr wrote:
> I think I have found the reason of the problem. It seems to be an incorrect
> character (Ascii code A0). I don't know why this character is there, but when I
> remove it, everything is ok.
0xA0 is a non-breaking space (chr(160), HTML ), and is not part of the
US-ASCII character set.
(for some reason, it didn't survive the paste-into-mail-and-paste-from-mail-into-
editor trip, which is why your example worked well on my machine).
if you want to use that character in the file, set the encoding to"iso-8859-1" in-
stead of "us-ascii".
More information about the XML-SIG