<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<STYLE>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</STYLE>
<META content="MSHTML 6.00.6000.16587" name=GENERATOR></HEAD>
<BODY class=hmmessage id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px"
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Arial>Hello,</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>I'm writing a small wxpython application, using
SimpleXMLRPCServer for client/server communication. It works pretty fine and I
XMLRPCServer is relly reliant. During unit test phase,I found a small problem
that I can't face since I'm not well aware about encoding. Anyway here is the
problem:</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>My client sends a string parameter through a XMLRPCserver
remote methode call. the server process it and returns a result. The issue rise
when I send a french character (I suppose it would be the same with any non
conventional char like chines or whatever..) embeded within the string. for
example "é" (but simple quote or "ç" crashes aswell). the exception raised
is:</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>"""</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial> File
"C:\Python25\Lib\site-packages\app\common\gui.py", line 31, in
broadcastMsg<BR>
c=self._srvConn.export_broadcastMsg(msg,hashid)<BR> File
"C:\Python25\lib\xmlrpclib.py", line 1147, in __call__<BR>
return self.__send(self.__name, args)<BR> File
"C:\Python25\lib\xmlrpclib.py", line 1437, in __request<BR>
verbose=self.__verbose<BR> File "C:\Python25\lib\xmlrpclib.py", line 1201,
in request<BR> return self._parse_response(h.getfile(),
sock)<BR> File "C:\Python25\lib\xmlrpclib.py", line 1340, in
_parse_response<BR> return u.close()<BR> File
"C:\Python25\lib\xmlrpclib.py", line 787, in close<BR> raise
Fault(**self._stack[0])<BR>xmlrpclib.Fault: <Fault 1: "<class
'xml.parsers.expat.ExpatError'>:not well-formed (invalid token): line 6,
column 15"></FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>"""</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>I've been reading around and found that a "encoding"
parameter could be set at SimpleXMLRPCServer level. The question I have here is:
"What Damned encoding should I chosse in order to make my server as
international language compliant as possible?"</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Thanks in advance and sorry for my poor knowledge of
english language,</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Ludo</FONT></DIV></BODY></HTML>