<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
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.<br>
<br>
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:<br>
<br>
<pre>&lt;?xml version='1.0'?&gt;</pre>
<pre>&lt;methodCall&gt;</pre>
<pre>&lt;methodName&gt;connect&lt;/methodName&gt;</pre>
<pre>&lt;params&gt;</pre>
<pre>...</pre>
<pre>&lt;/params&gt;</pre>
<pre>&lt;/methodCall&gt;</pre>
<br>
This issue produces an error when "expat" parses the response in the
xmlrpc client:<br>
<br>
<pre>xml.parsers.expat.ExpatError: not well-formed (invalid token)

</pre>
There is an open ticket with a patch to deal with "Latin-1" encodings
at the xmlrpc server:<br>
<br>
<a href="http://twistedmatrix.com/trac/ticket/1909">http://twistedmatrix.com/trac/ticket/1909</a><br>
<br>
But it is not closed and it has been opened one year ago. <br>
<br>
How can I solve the encoding problem in the XMLRPC server response? <br>
<br>
Thank you.<br>
<div class="moz-signature"><br>
-- <br>
<br>
<title></title>
<p align="left"><span lang="es"><b><font color="#808080"
 face="RotisSemiSans">Daniel de la Cuesta Navarrete</font></b></span> <br>
<span lang="es"><b><font color="#808080" face="RotisSemiSans">T&eacute;cnico
de Desarrollo de Software</font></b></span></p>
<p align="left"><span lang="es"></span><span lang="es"><font
 color="#339966" face="IAVANTE" size="4">FUNDACI&Oacute;N IAVANTE</font></span>
<br>
<span lang="es"><font color="#339966" face="RotisSemiSans"><a class="moz-txt-link-abbreviated" href="mailto:daniel.cuesta@iavantefundacion.com">daniel.cuesta@iavantefundacion.com</a></font></span>
<br>
<span lang="es"><font color="#339966" face="RotisSemiSans">Tel. 951 015
300</font></span> </p>
<br>
<p align="center"><span lang="es"><font color="#999999" face="Verdana"
 size="1">Este correo electr&oacute;nico y, en su caso, cualquier fichero
anexo, contiene informaci&oacute;n confidencial exclusivamente dirigida a
su(s) destinatario(s). Toda copia o divulgaci&oacute;n deber&aacute; ser autorizada
por IAVANTE.</font></span></p>
<p align="center"><span lang="en-gb"><font color="#999999"
 face="Verdana" size="1">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.</font></span></p>
<br>
</div>
</body>
</html>