veda-consulting / org.civicrm.sms.clickatell

Clickatell integration allows delivering short message service (SMS) messages through its Clickatell Gateway to mobile phone users.
1 stars 15 forks source link

unicode is not supported #27

Open petergerner opened 5 years ago

petergerner commented 5 years ago

I have CiviCRM 5.13 on Drupal7 with clickatell release v4.1. Clickatell integration works, SMS can be sent via HTTPS from the browser. Database and environment is set to UTF-8.

However, if an SMS is compiled in CiviCRM, non-English characters, like é,á,... are lost or transformed in the SMS body. If the same text is sent over curl / HTTPS directly to Clickatell, there is no such issue.

I suspect this unicode issue arises from the clickatell extension. It uses the utf8_decode() function here 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.

See this PR: #26