15 Oct
2003
15 Oct
'03
11:07 a.m.
On Wednesday 15 October 2003 12:09, Gilles Lenfant wrote:
# Client side (external method) charset = 'iso-8859-1' # Setting params a = unicode(a, charset) b = unicode(b, charset) # Making request server = xmlrpclib.Server("http://some.webservice.net/") resultstring = server.doStuff(a, b).encode(charset, 'replace')
# Server side handler (TTW python script) ##parameters=a, b charset = 'utf-8' a = a.encode(charset, 'replace') b = b.encode(charset, 'replace') # Do the stuff ... return unicode(stuff, charset)
The above will work, but I really recommend (if possible) working with all those values as unicode in the rest of your program too, client and server side. -- Toby Dickenson