vonage-php-sdk-core icon indicating copy to clipboard operation
vonage-php-sdk-core copied to clipboard

Way to know what encoding text is in

Open robertmylne opened this issue 3 years ago • 1 comments

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.

robertmylne avatar Jun 17 '22 05:06 robertmylne

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?

SecondeJK avatar Jul 12 '22 12:07 SecondeJK

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

SecondeJK avatar Aug 19 '22 14:08 SecondeJK

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.

robertmylne avatar Sep 06 '22 08:09 robertmylne