libpynexmo icon indicating copy to clipboard operation
libpynexmo copied to clipboard

Lib forces unicode encoding when sending non ascii characters, even if they are in the GSM 03.38 alphabet

Open f-ld opened this issue 11 years ago • 0 comments

Hi,

When sending a text message, the library tries to decode the message as ascii and if it fails then encodes the text as utf-8 and sets the type parameter to unicode which is not correct.

For example, there are many characters in the GSM 03.38 alphabet that are not ascii but do not require unicode encoding. Flagging these messages as type=unicode implies that the maximum length allowed for messages decreases to 70 characters and makes many messages to be sent as multipart (and charged for each part) while it's not required.

Finally, this may cause some encoding issues with some network or phones.

Best regards, Fabien

f-ld avatar Nov 04 '14 10:11 f-ld