issue with subscriberAddAndResubscribeWithCustomFields and accents


I am having an issue with the subscriberAddAndResubscribeWithCustomFields() with the PHP api. I can't add or resubscribe an user if there are accentuated chars.

Here is a sample of my code:


$cm = new CampaignMonitor($apiKey, $clientId, $campaingId, $listId, 'soap');

if (!$cm->subscriberAddAndResubscribeWithCustomFields('', 'noel', array('job' => 'développeur'), $listId)) 
  throw new Exception('An error occurred');

If I removed the "é" from the word "développeur", I don't have any error.

I'm using utf-8 encoding, which seems to be the encoding used by the SOAP request. Should I convert my values in latin7 ?



Ken Ken, 8 years ago

Hi Noel,

When you say that you can't add or resubscribe, what do you mean? Does it request fail with an error message. Does it appear to work fine, but when you look at the subscriber, the accented character looks weird?

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free