[Soap-Python] rpclib and unicode strings

Dieter Maurer dieter at handshake.de
Mon Feb 20 07:38:03 CET 2012


azurIt wrote at 2012-2-19 15:54 +0100:
>
>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?

This is typical Python 2 behaviour. Python 2 sees ASCII encoded "str"
and the unicode section representing ASCII as equivalent.

Some modules in the Python runtime library (e.g. "xmlrpclib") try hard
to convert pure ASCII unicode strings into "str", probably to
make it easier to use them as attribute/method names (where unicode
is rejected).



--
Dieter


More information about the Soap mailing list