ID: 34748
User updated by: flobee at gmail dot com
Reported By: flobee at gmail dot com
-Status: Feedback
+Status: Open
Bug Type: SOAP related
Operating System: xp/*nix
PHP Version: 5.1.0RC1
New Comment:
[server]
theServerClass {
function __construct() { }
function set($in) {
return array('code'=>'â¬â¬â¬');
}
}
$server = new SoapServer('a.wsdl',array('encoding'=>'ISO-8859-1'));
$server->setClass('theServerClass');
$server->handle();
[client]
$cli = new SoapClient('a.wsdl',
array('encoding'=>'ISO-8859-1','soap_version'=> SOAP_1_2, 'trace'=>
1));
$result = $cli->set('somthing');
print_r($cli->__getLastResponse());
...
xml-Response: <?xml version="1.0" encoding="UTF-8"?>
but IS ISO-8859-1
set encoding to utf-8 the "â¬" will throw a SoapFault.
Previous Comments:
------------------------------------------------------------------------
[2005-10-06 13:34:31] [EMAIL PROTECTED]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2005-10-06 07:11:49] flobee at gmail dot com
Description:
------------
request and Response are always set to utf-8 even when server and
client are set to ISO-8859-1 :-(
the good: it's handled to be ISO-8859-1 or will throw a SoapFault.
Reproduce code:
---------------
$a =new SoapClient($wsdl, array('encoding'=>'ISO-8859-1');
$b=new SoapServer($wsdl , array('encoding'=>'ISO-8859-1'));
xml-Request : <?xml version="1.0" encoding="UTF-8"?>...
xml-Response: <?xml version="1.0" encoding="UTF-8"?>...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34748&edit=1