+ public function testLatin1String()
+ {
+ $sendString =
+ "last but not least weird names: G" . chr(252) . "nter, El" . chr(232) . "ne";
+ $f = '<?xml version="1.0" encoding="ISO-8859-1"?><methodCall><methodName>examples.stringecho</methodName><params><param><value>'.
+ $sendString.
+ '</value></param></params></methodCall>';
+ $v = $this->send($f);
+ if ($v) {
+ $this->assertEquals($sendString, $v->scalarval());
+ }
+ }
+
+ /*public function testLatin1Method()
+ {
+ $f = new xmlrpcmsg("tests.iso88591methodname." . chr(224) . chr(252) . chr(232), array(
+ new xmlrpcval('hello')
+ ));
+ $v = $this->send($f);
+ if ($v) {
+ $this->assertEquals('hello', $v->scalarval());
+ }
+ }*/
+
+ public function testUtf8Method()
+ {
+ PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding = 'UTF-8';
+ $f = new xmlrpcmsg("tests.utf8methodname." . 'κόσμε', array(
+ new xmlrpcval('hello')
+ ));
+ $v = $this->send($f);
+ if ($v) {
+ $this->assertEquals('hello', $v->scalarval());
+ }
+ PhpXmlRpc\PhpXmlRpc::$xmlrpc_internalencoding = 'ISO-8859-1';
+ }
+