5
4

4 回答 4

1

You can try setting the encoding to UTF-8

Example

$client = new SoapClient('http://www.example.com/webservice.asmx?WSDL', array('trace' => 1, 'encoding'=>' UTF-8'));
于 2012-09-23T14:22:54.427 回答
0

尝试

 $result_1 = urldecode($client->GetText());
 $result_2 = urldecode($client->GetText_withSpecialCharacter()); 
于 2012-09-23T14:44:22.223 回答
0

也许你可以试试这个:

$myString = $client->GetText_withSpecialCharacter();
$result_2 = urldecode($myString);
if ($myString != urlencode($result_2)) {
  $result_2 = mb_convert_encoding($myString, "UTF-8", mb_detect_encoding($myString,"auto",true));
}
于 2012-09-27T16:34:59.767 回答
0

这个问题很老,但有一个解决方案:

$result_2 = html_entity_decode($client->GetText_withSpecialCharacter(), ENT_QUOTES | ENT_XML1);

似乎不是有效的 UTF-8 字符。0xE是移出字符。

于 2016-03-15T17:45:33.323 回答