Answers.Body: <p>I suspect the unicode issue arises from the <a href="https://github.com/veda-consulting/org.civicrm.sms.clickatell" rel="nofollow noreferrer">clickatell extension</a>. It uses the <code>utf8_decode()</code> function to decode the message text from a UTF-8 string to ISO-8859-1 before posting to Clickatell. Hence Clickatell manages UTF-8 messages, the use of <code>utf8_decode()</code> is not necessary, and removing it resolves my issue above.</p>
  
  <p>Replace <a href="https://github.com/veda-consulting/org.civicrm.sms.clickatell/blob/master/org_civicrm_sms_clickatell.php#L260" rel="nofollow noreferrer">original code</a>: </p>
  
  <pre><code>$postDataArray['text'] = utf8_decode(substr($message, 0, 460)); // max of 460 characters, is probably not multi-lingual
  $postDataArray['content'] = utf8_decode(substr($message, 0, 460)); // max of 460 characters, is probably not multi-lingual
  </code></pre>
  
  <p>to this one:</p>
  
  <pre><code>$postDataArray['text'] = substr($message, 0, 460); // max of 460 characters, is probably not multi-lingual
  $postDataArray['content'] = substr($message, 0, 460); // max of 460 characters, is probably not multi-lingual
  </code></pre>
  
  <p>I'll provide a patch to Clickatell extensions, if this solution gets confirmed by the community.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-24T07:06:36.033Z
Answers.Text: PR is sent: https://github.com/veda-consulting/org.civicrm.sms.clickatell/pull/26
Answers.UserDisplayName: Doka
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-05-21T15:04:06.437Z
Answers.LastActivityDate: 2019-05-21T15:04:06.437Z
Answers.UserDisplayName: Doka
Body: <p>I have CiviCRM 5.13 on Drupal7 with the clickatell v4.1 extension for SMS. Clickatell integration works, I can send test SMS via HTTPS from the browser to test phones. Database and environment is set to UTF-8.</p>
  
  <p>However, if a mass SMS is compiled in <a href="https://example.com/civicrm/sms/send?reset=1" rel="nofollow noreferrer">https://example.com/civicrm/sms/send?reset=1</a>, or a direct SMS is sent, the non-English characters, like é,á,... are lost or transformed in the SMS body. If the same text is sent over HTTPS/curl directly to Clickatell, there is no such issue.</p>
  
  <p>Is it a CiviCRM issue, or a misconfiguration on my side? How can I track it down?</p>
  
Tags: <sms><civisms><clickatell>
Title: Is unicode not supported in clickatell SMS extension?
ThreadText: # Is unicode not supported in clickatell SMS extension?
  
  (Asked by: username_0 on 2019-05-21)
  
  I have CiviCRM 5.13 on Drupal7 with the clickatell v4.1 extension for SMS. Clickatell integration works, I can send test SMS via HTTPS from the browser to test phones. Database and environment is set to UTF-8.
  
  However, if a mass SMS is compiled in <https://example.com/civicrm/sms/send?reset=1>, or a direct SMS is sent, the non-English characters, like é,á,... are lost or transformed in the SMS body. If the same text is sent over HTTPS/curl directly to Clickatell, there is no such issue.
  
  Is it a CiviCRM issue, or a misconfiguration on my side? How can I track it down?
  
  **Tags:** sms, civisms, clickatell
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-05-21. Score: 4 | Accepted answer
  
  I suspect the unicode issue arises from the [clickatell extension](https://github.com/veda-consulting/org.civicrm.sms.clickatell). It uses the `utf8_decode()` function to decode the message text from a UTF-8 string to ISO-8859-1 before posting to Clickatell. Hence Clickatell manages UTF-8 messages, the use of `utf8_decode()` is not necessary, and removing it resolves my issue above.
  
  Replace [original code](https://github.com/veda-consulting/org.civicrm.sms.clickatell/blob/master/org_civicrm_sms_clickatell.php#L260):
  
  ```
  $postDataArray['text'] = utf8_decode(substr($message, 0, 460)); // max of 460 characters, is probably not multi-lingual
  $postDataArray['content'] = utf8_decode(substr($message, 0, 460)); // max of 460 characters, is probably not multi-lingual
  
  ```
  
  to this one:
  
  ```
  $postDataArray['text'] = substr($message, 0, 460); // max of 460 characters, is probably not multi-lingual
  $postDataArray['content'] = substr($message, 0, 460); // max of 460 characters, is probably not multi-lingual
  
  ```
  
  I'll provide a patch to Clickatell extensions, if this solution gets confirmed by the community.
  
  > **Comments:**
  > **username_0**: PR is sent: https://github.com/veda-consulting/org.civicrm.sms.clickatell/pull/26  
  
  ---
  
  