michaelkourlas / voipms-sms-client

Popular Android messaging app for VoIP.ms, a Canadian VoIP provider
https://play.google.com/store/apps/details?id=net.kourlas.voipms_sms
Apache License 2.0
223 stars 52 forks source link

Not able to send long french message #203

Closed Whateverman2012 closed 4 years ago

Whateverman2012 commented 4 years ago

Hi, I know there was a ticket before about this. But I continued to have trouble to send message even if the ticket was closed. So I forked the code to investigate. I dug to Voip.ms sms center to see how they process characters. And the utf-8 format is used. I thought it was gsm related charset first. If you try to send a serie of "é" by example, You'll be able to send 80/160 bytes (not chars). The length of utf-8 chars varies from 1 to 2 bytes. In the actual code all chars are counted as 1 byte. In english it works indeed... So I modify the code to count message length in utf-8. I don't have the "Not sent. Touch to try again." message anymore. I have to tweak the way the remaining chars hint is calculated. The case a 2 bytes char is sit on a boundary (which will be in the next 180 bytes part) is not handled for the moment.

Hope it is useful. A least intriguing.

Regards

michaelkourlas commented 4 years ago

Thanks for the update -- I'll look into this.

michaelkourlas commented 4 years ago

I've verified this behaviour.