I'm having problems with encoding, my store is so configured:

enter image description here

And in my php code:

$client = new SoapClient($url, array('trace' => 1, 'encoding'=>'UTF-8'));
$session_id = $client->login($username, $password);
$result = $client->customerCustomerList($session_id);

But the customer's name is with character problems: enter image description here

2 Answers 2


I am pretty sure this is working correctly. However the var_dump seems to produce output which is displayed by your browser not using UTF-8 encoding.

You can try adding header('Content-Type:text/html; charset=UTF-8'); before your var_dump or an echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';

  • @MateusVitali that's great - feel free to mark this answer as the accepted solution May 19, 2016 at 15:33

Make sure PHP is using the correct encoding: mb_internal_encoding

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.