function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
colingcoling 

Getting (php) soap error response 'Invalid byte 1 of 1-byte UTF-8 sequence'

Hi,

I have just submitted a case to support, but someone here may also have some insight.

I am getting error response 'Invalid byte 1 of 1-byte UTF-8 sequence' from Soap request using partner wsdl to a customer account.

Using PHP Toolkit.

PHP Snippet:
...
$sObject = new SObject();
$sObject->type = 'Follow_Up_Lead_Message_History__c';
$sObject->fields = <<<<as below - my customer's data>>>>
(
    [BizConnector_ID__c] => 7373925
    [Mailing_ID__c] => 8894840
    [From_Name__c] => Your Friends at <customer company>
    [From_Email__c] => <<customer email address>>
    [Message_Sent__c] => https://secure.bizconnector.com/sf/tab/msg/detail/msg_sent.php?user_id=1097~f_action=get_msg_sent~mailing_id=8894840~sent_id=7373925
    [Subject__c] => 5 Facts about your Dog you DIDN'T know
    [RuleName__c] => CASF2013
    [Lead__c] => 00Q5000000iITiTEAW
)
$res = $sf_connection->create(array ($sObject));

The log shows:
last_request=<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:sobject.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="urn:partner.soap.sforce.com"><SOAP-ENV:Header><ns2:SessionHeader><ns2:sessionId>00D50000000JImf!ARgAQBEAWjsrsr0BUNqL8yQnnJwHf5uwR59QpyghG1mP48U4qJuEVqOG.Ma35AVmsi6SgCRxAcP8drx4M1y2JaBCGf4SJzKY</ns2:sessionId></ns2:SessionHeader><ns2:CallOptions><ns2:client>xxxxx</ns2:client><ns2:defaultNamespace xsi:nil="true"/></ns2:CallOptions></SOAP-ENV:Header><SOAP-ENV:Body><ns2:create><ns2:sObjects><ns1:type>Follow_Up_Lead_Message_History__c</ns1:type><ns1:Id xsi:nil="true"/><BizConnector_ID__c>7373925</BizConnector_ID__c><Mailing_ID__c>8894840</Mailing_ID__c><From_Name__c>Your Friends at xxxxx</From_Name__c><From_Email__c>xxx@xxxx.com</From_Email__c><Message_Sent__c>https://secure.bizconnector.com/sf/tab/msg/detail/msg_sent.php?user_id=109651~f_action=get_msg_sent~mailing_id=8894840~sent_id=7373925</Message_Sent__c><Subject__c>5 Facts about your Dog you DIDN'T know</Subject__c><RuleName__c>CASF2013 </RuleName__c><Lead__c>00Q5000000iITiTEAW</Lead__c></ns2:sObjects></ns2:create></SOAP-ENV:Body></SOAP-ENV:Envelope>

last_request_hdrs=POST /services/Soap/u/24.0/00D50000000JImf HTTP/1.1
Host: na3.salesforce.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.12
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 1282


last_response=<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Client</faultcode><faultstring>Invalid byte 1 of 1-byte UTF-8 sequence.</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>

This error has occurred/is occurring with only one customer. It started on 12/31/2013, and seems to be related to this customer only (it seems that it may be ongoing). This leads me to think that it is data-specific, but I do not see anything wrong with the contents of the fields. I do not see evidence of this error elsewhere, and this code has been operating - without this error - since 2007.

I must be missing something - can anyone see what I am missing?

Thanks in anticipation.

Colin Goldberg


Om MishraOm Mishra
Hi Cooling,

Please refer the below link. It may help you to solve your issue.

http://stackoverflow.com/questions/15545720/how-to-fix-invalid-byte-1-of-1-byte-utf-8-sequence

Thanks,
Om Mishra
DBSync
www.mydbsync.com