I store my content in a MySQL database. The website is using PHP. Data fields are encoded so that html tags are using entities; i.e. <p> = <p> When I query the database I decode the entities, and then strip the tags. That works fine. But some entities don't get converted. So causes a problem for a cURL message. The message is truncated at the ampersand. So I did a string replace where becomes a space. So that solved one problem. But ampersand is still a problem. Neither & or simply & work. The both result in a truncated message. A string replace of & with 'and' seems to work. But is kind of weird.
I have also tried utf8_encode($message) but I don't see any difference in the output or the result with the API. All of the API help and samples I have seen use a very simple message example. I have not seen any help on how to format the actual message. I saw some where that it should be UTF-8. Mostly the messages are plain text, but these two characters cause problems. So do quotes and single quotes as far as that goes. If I add slashes the slashes come through in the final message. Is there any real help for these problems?