lukeredpath / clickatell

NO LONGER SUPPORTED - Ruby interface to the Clickatell SMS Gateway API
http://clickatell.rubyforge.org
MIT License
138 stars 60 forks source link

FYI on concatenated messages #7

Open eimermusic opened 13 years ago

eimermusic commented 13 years ago

I saw the commits regarding the concat parameter. AFAIK this value indicates the maximum length allowed, not the actual length of the current message. The reason is that the parameter is there to allow you, as the user of Clickatell, to set a limit compatible with the country you are sending to. Some countries (at least via Clickatell) only support 1,2 or 3 parts.

I am not sure setting it automatically is the best option. I'd prefer it if a user set :concat took priority and the automatic one was a fallback.

I also wanted to note that messages with more than 160 characters are split but that is not the whole truth. A character is a GSM character. I.E. some rarer characters are "extended" and count as two. When a message is 161 characters long it is not split as 160 + 1 but rather 153 or 152 + the remaining chars in order to leave room for the concatenation data in the remaining bytes. The split will vary depending on the number of extended characters in the message. That is why we love Clickatell for taking care of the splitting internally.... unlike some aggregators.

If Github can handle them here are the extended ones: €|^{}[]~\

Yes, a real mess. Learning and figuring this stuff out was not as much fun as going to a sadistic dentist. :)