SOAP-ERROR: Encoding: string … is not a valid utf-8 string

前端 未结 6 617
情书的邮戳
情书的邮戳 2021-01-02 22:10

Hi I have a web service built using the Zend Framework. One of the methods is intended to send details about an order. I ran into some encoding issue. One of the values bein

6条回答
  •  无人及你
    2021-01-02 22:42

    Today I run into same problem - the code which caused that problem was:

    $request->Text = substr($text, 0, 40);
    

    changing substr to mb_substr seems to solve the issue:

    $request->Test = mb_substr($text, 0, 40, 'utf8');
    

提交回复
热议问题