We have a workaround in place for fields.function of binary type that may return values that are invalid in XML documents, and thus in our XML-RPC protocol. But out workaround failed to care for the invalid XML codepoints (below 0x1f) that are well valid in UTF-8 encoding. Added a sanity check for that as well, using a terrible workaround for this last resort case: b64-encode the bytes, to avoid crashing the request. bzr revid: odo@openerp.com-20110906173140-vc4tl6wstzt8h06o