473,574 Members | 2,472 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 SimpleXMLRPCSer ver

server = SimpleXMLRPCSer ver.SimpleXMLRP CServer(("local host",8003))
def test():
return "Test with the non ascii character 'ñ'"

server.register _function(test)
server.serve_fo rever()
-----------XMLRPC Server-------------

2.- In a second terminal run this:

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

server = xmlrpclib.Serve r(("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(sel f.__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_res ponse(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.Pa rse(data, 0)
xml.parsers.exp at.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)

iD8DBQBCwqCmU6r FMEYDrlERAs7xAJ 9MbhuB1flFuvg2J a131yMjNH94MACf QhY6
E9/JrSUX6sfVWWc4HO jUc2E=
=jA9n
-----END PGP SIGNATURE-----

Jul 19 '05 #1
1 2786

"Joxean Koret" <jo*********@ya hoo.es> wrote in message
news:ma******** *************** *************** *@python.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
1825
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> <script src="jsolait/lib/urllib.js"></script> <script src="jsolait/lib/xml.js"></script>
0
1724
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 server (programmed with python). - The COM server must have a connect interface in order to let the client application process the xmlrpc request. -...
0
1169
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). When request is received the handler is called with proper parameters. As I understood from reading the source, if rpc call can't be executed...
6
5337
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 single-person as a backend and GUI frontend. I've got it running great. Much stabler than my custom RPC I'd tried before. I've used the default support...
4
8185
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 there, but if it's already installed what do I change to get this version working? Currently, I am calling ... require("../xmlrpc/lib/xmlrpc.inc");...
3
2834
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 the functions to use in c++. Well, i think that it is more difficult to use than xmlrpc++ that it is made in c++. The trouble is that the...
1
2711
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 with .Net remoting and had success connecting from Java. I need to connect from C++ however, and haven't had any luck there. Here is what I did for...
1
2510
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 with .Net remoting and had success connecting from Java. I need to connect from C++ however, and haven't had any luck there. Here is what I did for...
0
2740
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: ext/xmlrpc/.libs/xmlrpc-epi-php.o(.text+0x359): In function `set_zval_xmlrpc_type': /php-5.2.5/ext/xmlrpc/xmlrpc-epi-php.c:1313: undefined reference to...
4
3931
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
7794
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8040
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8225
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7800
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8092
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5610
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3738
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2230
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1051
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.