@@ 261-265 (lines=5) @@ | ||
258 | } |
|
259 | ||
260 | // What if internal encoding is not in one of the 3 allowed? We use the broadest one, ie. utf8! |
|
261 | if (!in_array(PhpXmlRpc::$xmlrpc_internalencoding, array('UTF-8', 'ISO-8859-1', 'US-ASCII'))) { |
|
262 | $options = array(XML_OPTION_TARGET_ENCODING => 'UTF-8'); |
|
263 | } else { |
|
264 | $options = array(XML_OPTION_TARGET_ENCODING => PhpXmlRpc::$xmlrpc_internalencoding); |
|
265 | } |
|
266 | ||
267 | $xmlRpcParser = new XMLParser($options); |
|
268 | $xmlRpcParser->parse($xmlVal, XMLParser::RETURN_XMLRPCVALS, XMLParser::ACCEPT_REQUEST | XMLParser::ACCEPT_RESPONSE | XMLParser::ACCEPT_VALUE); |
@@ 268-272 (lines=5) @@ | ||
265 | // What if internal encoding is not in one of the 3 allowed? We use the broadest one, ie. utf8 |
|
266 | // This allows to send data which is native in various charset, |
|
267 | // by extending xmlrpc_encode_entities() and setting xmlrpc_internalencoding |
|
268 | if (!in_array(PhpXmlRpc::$xmlrpc_internalencoding, array('UTF-8', 'ISO-8859-1', 'US-ASCII'))) { |
|
269 | $options = array(XML_OPTION_TARGET_ENCODING => 'UTF-8'); |
|
270 | } else { |
|
271 | $options = array(XML_OPTION_TARGET_ENCODING => PhpXmlRpc::$xmlrpc_internalencoding); |
|
272 | } |
|
273 | ||
274 | $xmlRpcParser = new XMLParser($options); |
|
275 | $xmlRpcParser->parse($data, $returnType, XMLParser::ACCEPT_RESPONSE); |
@@ 500-504 (lines=5) @@ | ||
497 | // What if internal encoding is not in one of the 3 allowed? We use the broadest one, ie. utf8 |
|
498 | // This allows to send data which is native in various charset, |
|
499 | // by extending xmlrpc_encode_entities() and setting xmlrpc_internalencoding |
|
500 | if (!in_array(PhpXmlRpc::$xmlrpc_internalencoding, array('UTF-8', 'ISO-8859-1', 'US-ASCII'))) { |
|
501 | $options = array(XML_OPTION_TARGET_ENCODING => 'UTF-8'); |
|
502 | } else { |
|
503 | $options = array(XML_OPTION_TARGET_ENCODING => PhpXmlRpc::$xmlrpc_internalencoding); |
|
504 | } |
|
505 | ||
506 | $xmlRpcParser = new XMLParser($options); |
|
507 | $xmlRpcParser->parse($data, $this->functions_parameters_type, XMLParser::ACCEPT_REQUEST); |