WCF hizmeti UTF-16 karakter göndermek için PHP'nin SoapClient kullanma

1 Cevap php

My PHP application is taking user input and sending it to a WCF Web Service. Sometimes my users copy and paste from Word and get UTF-16 Characters into their message such as the "En Dash" \u2013

Bu ortaya çıktığında ben aşağıdaki hatayı alıyorum.

PHP Fatal error: SOAP-ERROR: Encoding: string '\xe2...' is not a valid utf-8 string in *** on line 31

I've tried setting the encoding option of the SoapClient constructor to 'UTF-16'. My request seems to work, but I notice the encoding on the xml header is still set to UTF-8.

Herhangi bir fikir?

1 Cevap

WCF sadece UTF-8 çalışır ve kelime UTF8'den gibi neden onun lookling açıklar varsayılan olarak UTF-16 çalışıyor

Sorunu düzeltmek için mbstring'i kullanmayı deneyin