Nigel, basically, here is a typical case :
here is more or less the sequence I have :
// PREPARING
$userhost = get_field('mnet_host', '
wwwroot', 'id', $USER->mnethostid);
$rpcclient = new mnet_xmlrpc_client();
$rpcclient->set_method('blocks/file_manager/rpclib.php/file_manager_rpc_addlink');
$rpcclient->add_param($USER->username, 'string');
$rpcclient->add_param($userhost, 'string');
$rpcclient->add_param($CFG->wwwroot, 'string');
// fixes an XML-RPC transcoding issue... $rpcclient->add_param(html_entity_decode(utf8_decode($linkname)), 'string'); $rpcclient->add_param($what, 'string');
$mnet_host = new mnet_peer();
$mnet_host->set_wwwroot($userhost);
// EXECUTING
if (!$rpcclient->send($mnet_host)){
if (debugging()){
print_object($rpcclient);
}
error(get_string('failed', 'file_manager').'<br/>'.implode("<br/>\n", $rpcclient->error));
}
print_object(json_decode($rpcclient->response));
(yes, I use jsoning the transmitted message as I noticed objet/array consistency issues when sendign complex structure directly. json_encoding makes structure being safe across tranport.)
the issue is marked as red : without the utf8_decode, the $linkname content, when using accent letters such in "Découvrir Pairform@nce" is retrieved with \uXXX encoded sequences at the other end, as an ISO escaped expression of UTF sequences. This is quite odd indeed, but I noticed that already when retrieving a remote course list through MNET remote enrollement : course names using UTF8 escapes come also backencoded.
Hope it helps you...