vonage-php-sdk-core
vonage-php-sdk-core copied to clipboard
Way to know what encoding text is in
Is there a method to check a string an calculate whether it is GSM, GSM extended or Unicode compatible and how many message parts it will be?
This would help to live show the current encoding required, character count and message parts.
We did have this previously, but the reason it was taken out was because it actually didn't work as identified with a recent bug that has been fixed. The unit tests attempted to identify whether something was GSM/GSM-E/Unicode and gave it a false positive.
It used to be in the constructor for the SMS client, but I could add a new helper in as a static method if that helps?
Closing this now as it's something I feel should be down the user - if we have the library itself handle this then it could possibly be prone to errors as in the past
What caused the errors as if we create a user solution wouldn't it just experience the same issues. Also, the MessagesAPI says it can auto detect whether it is unicode or GSM, so working copy of the code must exist.