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, 7 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?

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free