On 02/19/12 16:54, azurIt wrote:
Little more info:
When i send ASCII chars, i got 'str' type but when i send unicode chars, i got 
'unicode' type. What should i do to always get unicode?


hi,

you need to provide me with a test case to have something to discuss on.

rpclib relies on lxml for unicode conversion when dealing with xml data. turns out it's a little quirky:

In [4]: a=etree.fromstring('<?xml version="1.0" encoding="UTF-8"?><root><child>data</child></root>')

In [5]: a[0].text
Out[5]: 'data'

In [6]: a=etree.fromstring('<?xml version="1.0" encoding="UTF-8"?><root><child>dataƧ</child></root>')

In [7]: a[0].text
Out[7]: u'data\xe7'

so, doing unicode(str) in https://github.com/arskom/rpclib/blob/master/src/rpclib/model/primitive.py#L142 could safely fix your problem. is this ok with you?

best,
burak
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to