[issue7727] xmlrpc library returns string which contain null ( \x00 )

Martin v. Löwis report at bugs.python.org
Wed May 22 17:02:59 CEST 2013


Martin v. Löwis added the comment:

Serhiy: The patch fixes the OP's concern, but not the extended concern about producing ill-formed XML (at least not for 2.7). If the string contains non-UTF-8 data, yet the XML declaration says UTF-8, it's still ill-formed, and not caught by your patch.

I wonder whether xmlrpclib.Error would be a better exception than ValueError (although ValueError is also plausible); either way, the case should be documented.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7727>
_______________________________________


More information about the Python-bugs-list mailing list