473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

XMLRPC and non-ascii characters

Hi to all!

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

Example:

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 'ñ'"

server.register_function(test)
server.serve_forever()
-----------XMLRPC Server-------------

2.- In a second terminal run this:

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

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

-----------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/xmlrpclib.py", line 1032, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.3/xmlrpclib.py", line 1319, in __request
verbose=self.__verbose
File "/usr/lib/python2.3/xmlrpclib.py", line 1083, in request
return self._parse_response(h.getfile(), sock)
File "/usr/lib/python2.3/xmlrpclib.py", line 1217, in _parse_response
p.feed(response)
File "/usr/lib/python2.3/xmlrpclib.py", 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?

Regards,
Joxean Koret

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBCwqCmU6rFMEYDrlERAs7xAJ9MbhuB1flFuvg2Ja131y MjNH94MACfQhY6
E9/JrSUX6sfVWWc4HOjUc2E=
=jA9n
-----END PGP SIGNATURE-----

Jul 19 '05 #1
1 2766

"Joxean Koret" <jo*********@yahoo.es> wrote in message
news:ma***************************************@pyt hon.org...
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: glin | last post by:
Hi I am trying to integrate the xmlrpc server into a class, does anyone know how to get it working? test.html: <html> <head> <title>XMLRPC Test</title> <script src="jsolait/init.js"></script>...
0
by: Juan Carlos CORUÑA | last post by:
Hello all, I'm trying to create a COM Server with an embedded xmlrpc server. Here is way it must work: - The client application (programmed with a COM capable language) instantiates my COM...
0
by: elbertlev | last post by:
Hi! I'm trying to use py-xmlrpc. All works fine (and very fast) in one-threaded case, but I really have to serve many clients. As advertised, py-xmlrpc supports non-blocking calls (via select)....
6
by: Michael Urman | last post by:
Hi. I'm a user of python for about 3 years now. I've written a client-server application that uses SimpleXMLRPCServer and xmlrpclib.ServerProxy to communicate. It's intended to be used by a...
4
by: elyob | last post by:
Hi, I've got --with-xmlrpc option in my php.ini and can see on my phpinfo page. Now, how do I include this in some code? So far I've been downloading xmlrpc into a folder and just calling it from...
3
by: Manuel | last post by:
Hello I need a xmlrpc lib for c++. I know two: xmlrpc++ and xmlrpc-c. But i don't know that it is best for me. I am developing an application in c++. I read that the xmlrpc-c lib is in C and wrap...
1
by: tmugavero | last post by:
Hello All, I have a question that has been giving me a bit of trouble. Has anyone been able to connect to C# from non .net C++ via XmlRpc? I have been using the CookComputing XmlRpc Library...
1
by: tmugavero | last post by:
Hello All, I have a question that has been giving me a bit of trouble. Has anyone been able to connect to C# from non .net C++ via XmlRpc? I have been using the CookComputing XmlRpc Library...
0
by: Benjamin Grieshaber | last post by:
Hi, I´m on SuSE 9.3 with xmlrpc-c and xmlrpc-c-devel installed (ver. 0.9.10) I tried to compile php with xmlrpc support and got the following errors: ...
4
by: care02 | last post by:
I have implemented a simple Python XMLRPC server and need to call it from a C/C++ client. What is the simplest way to do this? I need to pass numerical arrays from C/C++ to Python. Yours, Carl
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.