[ZPT] External Methods and special characters

Fred Drake fred at zope.com
Tue Apr 13 17:22:17 EDT 2004


On Tuesday 13 April 2004 04:55 pm, Daniel DeLay wrote:
 >             I have an external method that issues an xml-rpc request. 
 > When the return value for this request contains an accent mark I get this
 > error message: ExpatError: not well-formed (invalid token)

It's not unusual for someone to toss Latin-1 into a message accidentally and 
not add an XML declaration to specify the encoding.  Have you checked the 
input message carefully?

Also, what version of Expat are you using?  You should be using 1.95.7 if 
possible, though I don't recall in bugs in the decoding for a long time.  You 
can get the version from Python:

    >>> from xml.parsers import expat
    >>> expat.version_info
    (1, 95, 7)


  -Fred

-- 
Fred L. Drake, Jr.  <fred at zope.com>
PythonLabs at Zope Corporation




More information about the ZPT mailing list