XML-RPC set XML encoding?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



XML-RPC gurus,

Does anyhow know how to set the character encoding for XML-RPC?

I am using the PHP built-in XML-RPC server to handle XML-RPC calls.
<?php
...
// create the XML-RPC server
$this->SERVER = xmlrpc_server_create();
...
// fetch the raw input stream which contains our XML data
$request_xml = file_get_contents("php://input");
error_log("REQUEST: ".$request_xml);
...
$response = xmlrpc_server_call_method($this->SERVER, $request_xml, "");
// Now we print the response for the client to read.
error_log("RESPONSE: ".$response);
print $response;
...
?>

ERROR LOG OUTPUT:

> REQUEST: <?xml version='1.0'?><methodCall>...
> RESPONSE: <?xml version="1.0" encoding="iso-8859-1"?><methodResponse>...

The $response XML contains the following first line:

   <?xml version="1.0" encoding="iso-8859-1"?>

However, I want to use UTF-8 always in order to support a variety of character sets. I thought that maybe the response XML encoding was being set to the same value as the request character set, but I want to force UTF-8 regardless.

Does anyhow know how to set the character encoding for XML-RPC?

Dante

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux