By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,389 Members | 1,989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,389 IT Pros & Developers. It's quick & easy.

XMLRPC and non-ascii characters

P: n/a
Hi to all!

I'm having troubles to make my XMLRPC application working with non
ASCII characters.


1.- In one terminal run the following script:

-----------XMLRPC Server-------------
import SimpleXMLRPCServer

server = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost" ,8003))
def test():
return "Test with the non ascii character ''"

-----------XMLRPC Server-------------

2.- In a second terminal run this:

-----------XMLRPC Client-------------
import xmlrpclib

server = xmlrpclib.Server(("localhost", 8003))

-----------XMLRPC Client-------------

When you runs the XMLRPC Client script the following error is raised:

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/python2.3/", line 1032, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.3/", line 1319, in __request
File "/usr/lib/python2.3/", line 1083, in request
return self._parse_response(h.getfile(), sock)
File "/usr/lib/python2.3/", line 1217, in _parse_response
File "/usr/lib/python2.3/", line 528, in feed
self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 5,
column 50

Any ideas of what can I do?

Joxean Koret

Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBCwqCmU6rFMEYDrlERAs7xAJ9MbhuB1flFuvg2Ja131y MjNH94MACfQhY6

Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a

"Joxean Koret" <jo*********> wrote in message
I'm having troubles to make my XMLRPC application working with non
ASCII characters.

I don't think XMLRPC has a mechanism for specifying an encoding other
than UTF-8 (and that only by default). If you recode to that, you'll
probably be OK.
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.