Problem with nusoap and certain characters
| From: | Jon Goodwin | Date: | Tue, 20 Jan 2004 12:59:54 +0000 |
| Subject: | Problem with nusoap and certain characters | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-1320@lists.php.net to get a copy of this message | ||
Hi,
I am trying to pass a GPB character (£) as a parameter to nusoap and I
am having problems.
I am using nusoap 0.6.3 with PHP 4.2.2 on Windows NT 5.0 and Apache
2.0.39.
Please see code below for the server and the client.
When I remove '£' from the parameter, it works fine.
However, if I change '£' to '£' it does work - I woudl prefer
not
to use a character entity defined by number as it is less reliable than by
name (on my browser it does not return a pound sign when rendered in HTML
but an odd L-shaped character).
Regards
Jon Goodwin.
<?php
// client.php
require_once("nusoap.php");
$soapclient = new
soapclient('http://localhost/dev/lib/SOAP/test/server.php');
$sv = new soapval('txt', 'string', 'Testing < &
£');
$params = array($sv);
echo "Result=" . $soapclient->call('test', $params);
echo("<h3>Request</h3><xmp>" . $soapclient->request .
"</xmp>");
echo("<h3>Response</h3><xmp>" . $soapclient->response .
"</xmp>");
?>
<?php
// server.php
require_once("nusoap.php");
$s = new soap_server;
$s->register('test');
function test($txt)
{
return $txt;
}
$s->service($HTTP_RAW_POST_DATA);
?>