opentelecoms-org / jsmpp

SMPP implemented in Java
Apache License 2.0
232 stars 164 forks source link

SubmitMultipartMultilangualExample - wrong value for MAX_MULTIPART_MSG_SEGMENT_SIZE_7BIT #141

Closed ivonko closed 4 years ago

ivonko commented 4 years ago

There is an error in SubmitMultipartMultilanguageExample which prevents successful sending of 7bit encoded Long/Multipart SM:

7bit message segment is defined as 154 chars: private static final int MAX_MULTIPART_MSG_SEGMENT_SIZE_7BIT = 154; It should be 153 chars! Every part of SM in 7bit encoding should be maximum UDH+153chars!

153 chars for 7-bit enc 134 chars for 8-bit enc - binary 67 chars for 16-bit enc - unicode

When using the example to send UCS2 messages (like in Arabic language), everything works good.

Ivo Parvanov

pmoerenhout commented 4 years ago

Indeed, this is not correct. I fixed it. It's time to update the examples. When splitting extended characters cannot divided into different parts, is also some which is missing here.

pmoerenhout commented 4 years ago

I just added a complete rewrite of the concatenation example, as it did to handle extended GSM characters correctly.