我有一个与this question有关的问题。我有一个Web服务(也使用PHP),返回一些名称。当其中任何一个包含瑞典字符(A,A或O)和可能其他人以及我获得的SOAPFault(看起来像我们有没有XML文档)。不过,我可以看到使用$ soapcalo全(正确的据我所知)响应 - > __ getLastResponse()获得。php肥皂客户端中的特殊字符问题
如何处理特殊字符?我试图在客户端和服务器上添加编码属性(utf-8),但没有成功。
编辑:SOAP响应的摘录:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="...">
<SOAP-ENV:Body>
<ns1:callFunctionResponse>
<ns1:Response>
<ns1:result>success</ns1:result>
<ns1:content>
<Contact>
<userName>VIB09SLA9EP</userName>
<firstName>Patrik</firstName>
<lastName>Stenström</lastName>
</Contact>
</ns1:content>
</ns1:Response>
</ns1:callFunctionResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
谢谢!
你能不能给我们的SOAP响应的第一线?由于SOAP是XML,所以一旦您在服务器上正确添加了UTF-8,响应XML就会告诉您它是UTF-8。如果XML确实包含了UTF-8,那么你会遇到一个问题,即它是ISO-8859-1。 – MSalters 2009-08-28 15:00:24