XML-RPC set XML encoding?

From: Date: Tue, 02 May 2006 06:45:31 +0000
Subject: XML-RPC set XML encoding?
Groups: php.general 
Request: Send a blank email to php-general+get-235230@lists.php.net to get a copy of this message
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

« previous php.general (#235230) next »