SimpleXmlRpcServer and character encoding
shymonb at poczta.onet.pl
Thu Oct 9 14:39:38 CEST 2008
Diez B. Roggisch-2 wrote:
> shymon wrote:
>> I'm using SimpleXmlRpcServer class. Although I set encoding parameter in
>> the constructor, I have to return all strings in default platform
>> (windows-1250/win32 or iso-8859-2/linux in my case). When I send values
>> in, for example, UTF-8, string received by client is messed up.
>> The client is written in java using Apache XmlRpc library 2.0.
>> Is there any solution other than sending all string values in Base64
> Use unicode-objects. And unicode IS NOT utf-8. The encoding parameter will
> affect the xml generated & send over the wire - *not* what strings you
> pass/return to your implementation.
> So I think you should remove the encoding parameter alltogether, as this
> will make the transport being in utf-8. Then use only unicode-objects in
> your python code. And on the java-side, things *should* be in order.
I have tried unicode strings also, let's say u"miłość".
Result received by the client was the same as if I sent UTF-8 encoded
View this message in context: http://www.nabble.com/SimpleXmlRpcServer-and-character-encoding-tp19896427p19898136.html
Sent from the Python - python-list mailing list archive at Nabble.com.
More information about the Python-list