Hi,

We are working on a middleware with Twisted that connects to a POP3 server and provides an XMLRPC interface (using twisted.web)) to interacts with third party clients.

The twisted middleware has to deal with non ASCII (UTF-8 or Latin-1) encodings in the subject and the body of the mail messages. I have seen that Twisted XMLRPC server doesn't specify the encoding of the XMLRPC response, for example:

<?xml version='1.0'?>
<methodCall>
<methodName>connect</methodName>
<params>
...
</params>
</methodCall>

This issue produces an error when "expat" parses the response in the xmlrpc client:

xml.parsers.expat.ExpatError: not well-formed (invalid token)

There is an open ticket with a patch to deal with "Latin-1" encodings at the xmlrpc server:

http://twistedmatrix.com/trac/ticket/1909

But it is not closed and it has been opened one year ago.

How can I solve the encoding problem in the XMLRPC server response?

Thank you.

--

Daniel de la Cuesta Navarrete
Técnico de Desarrollo de Software

FUNDACIÓN IAVANTE
daniel.cuesta@iavantefundacion.com
Tel. 951 015 300


Este correo electrónico y, en su caso, cualquier fichero anexo, contiene información confidencial exclusivamente dirigida a su(s) destinatario(s). Toda copia o divulgación deberá ser autorizada por IAVANTE.

This e-mail and any attachments are confidential and exclusively directed to its adressee(s). Any copy or distribution will have to be authorized by IAVANTE.