[Python-Dev] Re: [Patches] Patch for xmlrpc encoding
Martin v. Löwis
martin@v.loewis.de
10 Dec 2002 07:10:37 +0100
Ragnar KjÞrstad <python@ragnark.vestdata.no> writes:
> The library makes an assumption that is (IMHO) just not valid. There is
> simply no reason to assume strings use the packet encoding.
There isn't a reason to assume that strings use any other encoding,
either. Reliance on the default encoding should be avoided as much as
possible. Users wanting to transmit non-ASCII strings with xmlrpclib
should pass Unicode objects in the first place.
Use byte strings to represent bytes, use Unicode strings to represent
characters.
Regards,
Martin