XMLRPC and non-ascii characters
Fredrik Lundh
fredrik at pythonware.com
Wed Jun 29 09:15:09 EDT 2005
Joxean Koret wrote:
> I'm having troubles to make my XMLRPC application working with non
> ASCII characters.
you cannot just pass in 8-bit strings in arbitrary encodings and expect the XML-
RPC layer to automagically figure out what you're doing.
you can either use the encoding option to the ServerProxy constructor to tell
the proxy what encoding to assume for 8-bit strings:
proxy = ServerProxy(uri, encoding="iso-8859-1")
(see
http://www.python.org/doc/current/lib/module-xmlrpclib.html
for details)
or you can do things the right way and use Unicode strings for non-ASCII text.
</F>
More information about the Python-list
mailing list