Based on the other PHP sample submited, this is a function for sending UTF8 SMS.

The most important thing to see is the steps for succeeded in.

There is really no need to "alter" the UTF8 document. Since the sample "grec.txt" document is an UTF8 one, I only open it and transfer it to the SOAP request without any encoding.

Note that's UTF8 is heavier than ASCII.

(UTF UTF-8 16 Bit (max 70 chars)) instead of ASCII (7 or 8 bit) for a 160 max length simple text SMS.

 

For example, create a new document using PSPAD (free text editor), set the format to UTF8, go to a GREC or Japanese website to get UTF8 significant content, copy and paste a piece of 10 characters into the new pspad doc, and you will have your test document.

public function jobSubmitSMSUTF8($recipient )

    {

    $filename="/grec.txt"  ;

    $handle  = fopen($filename,  "r" );

    $mess = fread($handle, filesize($filename ));

    $params= array("JobSubmitRequest" => array (

                            "DocumentSet" => array(

                            "Document" => array ("ref" => "sms8", "DocType" => "text", "DocData"=>array("format"=>"text" , "_" => $mess ))),

                              "Message" => array(

                                                    "JobOptions" => array(

                                                    "SmsOptions" => array("CharacterSet" => "UTF-8" )),

                                                    "Destinations" => array (

                                                         "Sms" => array("ref" => "testutf8" , "refb64"=>"abcde", "Phone" => $recipient )),

                                                    "Contents" => array("Part" => array("DocRef" => "sms8" )))));

 

    return $this->_soapCall("JobSubmit", $params );

    }