Issue 679383: xmlrpclib: better string encoding in responce package (original) (raw)

ServerProxy class has optional 'encoding' argument. For now, this argument is used for packet encoding. 8-bit strings in the data structure are assumed to use this encoding, unicode strings converted to this encoding. But Unmarshaller class, that process response, use '_stringify' function for converting 7-bit strings to Python strings, 8-bit strings remains as unicode Python strings.

It seems more logicaly to convert strings in responce package to Python strings with encoding which used in ServerProxy constructor.

This patch adds optional 'encoding' argument to Unmarshaller class, Transport class and loads function.