-XML-RPC for PHP version 4.5.2 - unreleased
+XML-RPC for PHP version 4.5.2 - 2021/1/9
* improved: better phpdocs in the the php code generated by the Wrapper class
* improved: debugger favicon and page title when used from the phpjsonrpc library
+* fixed: allow `Encoder::decode` to properly support different target character sets for polyfill-xmlrpc decode functions
+
XML-RPC for PHP version 4.5.1 - 2021/1/3
'scalar' => $val
);
return (object)$xmlrpcVal;
+ case 'string':
+ if (isset($options['extension_api_encoding'])) {
+ $dval = @iconv('UTF-8', $options['extension_api_encoding'], $val);
+ if ($dval !== false) {
+ return $dval;
+ }
+ }
+ //return $val;
+ // break through voluntarily
default:
- return $xmlrpcVal->scalarval();
+ return $val;
}
}
if (in_array('dates_as_objects', $options) && $xmlrpcVal->scalartyp() == 'dateTime.iso8601') {
// What if internal encoding is not in one of the 3 allowed? We use the broadest one, ie. utf8!
if (!in_array(PhpXmlRpc::$xmlrpc_internalencoding, array('UTF-8', 'ISO-8859-1', 'US-ASCII'))) {
+ /// @todo emit a warning
$parserOptions = array(XML_OPTION_TARGET_ENCODING => 'UTF-8');
} else {
$parserOptions = array(XML_OPTION_TARGET_ENCODING => PhpXmlRpc::$xmlrpc_internalencoding);