[Expat-discuss] 'ASCII encoding error' with encoding 'iso-8859-1'
kward at orange.us
Wed Dec 15 18:04:44 CET 2004
No, it's from Python, but I suppose that it results from expat rejecting
the non-ASCII characters. Maybe not.
Python reads the characters OK - my insufficient workaround is to
translate all characters over 127 to '?' before feeding the XML to the
parser object which expat underlies.
> -----Original Message-----
> From: Karl Waclawek [mailto:karl at waclawek.net]
> Sent: Wednesday, December 15, 2004 10:57 AM
> To: Ken Ward
> Cc: expat-discuss at libexpat.org
> Subject: Re: [Expat-discuss] 'ASCII encoding error' with
> encoding 'iso-8859-1'
> Ken Ward wrote:
> > Hello,
> > I'm using expat from Python 2.1.1 on RedHat Linux. I think
> it's expat
> > 1.95.1, based on running 'strings' on the library.
> > I'm trying to parse a file with Latin-1 characters above
> 128. I set the
> > encoding to "iso-8859-1" in ParserCreate, but I get this error:
> > UnicodeError: ASCII encoding error: ordinal not in range(128)
> This does not seem to be an error message generated by Expat.
More information about the Expat-discuss