Mysterious xml.sax Encoding Exception

JKPeck JKPeck at gmail.com
Fri Feb 1 15:31:29 EST 2008


On Feb 1, 1:22 pm, "Martin v. Löwis" <mar... at v.loewis.de> wrote:
> > In both of these cases, there are only plain, 7-bit ascii characters
> > in the xml, and it really is valid utf-16 as far as I can tell.
>
> What do you mean by "7-bit ascii characters"? If it means what I think
> it means (namely, a sequence of bytes whose values are between 1 and
> 127), then it is *not* valid utf-16.
>
> > Now here is the hard part: This never happens to me, and having gotten
> > the actual xml content from one of the users and fed it to the parser,
> > I don't get the exception.
>
> > What could be going on?  We are all on Python 2.5 (and all on an
> > English locale).
>
> What operating system do they use, and how do they send you the file
> for verification? Can you have them run
>
> print repr(open(filename, "rb").read(10))
>
> and send you its output?
>
> Regards,
> Martin

They sent me the actual file, which was created on Windows,  as an
email attachment.  They had also sent the actual dataset from which
the XML was generated so that I could generate it myself using the
same version of our app as the user has.  I did that but did not get
an exception.



More information about the Python-list mailing list