FrontlineSMS

FrontlineSMS let users send, receive and manage SMS over a mobile network.

Any idea if it is possible to escape/alter the way in which the external command alters the contents of ${message_content} ?

Thank you,

Pablo

Tags: command, external, plus, sign, spaces

Views: 146

Reply to This

Replies to This Discussion

Hi Pablo,


External command url-encodes the ${message_content} variable (using http://docs.oracle.com/javase/1.5.0/docs/api/java/net/URLEncoder.ht... with UTF-8).

Most scripting languages will have a built-in or easily accessible url-decode function which will reverse this for you.

Hope this helps,

Alex

Hi Alex,

I've just seen your reply.

Do you know if there is any way to change the way in which spaces are encoded? I'm trying to use the + sign to indicate an operation (as entered by the user), and when the enconder kicks in I may end up with ...++... and not knowing if it is one space and a + sign, or two spaces!

Thanks a lot for your reply, and for any pointers you may have.

Cheers,

Pablo

Probably the easiest thing to do will be to tweak FrontlineUtils.java and change the + signs that I wish to keep into something else before calling URLDecoder.decode()

I see that URLDecoder.decode() is also called in SMSGatewayProxy.java but I'm only using GPRS modems at the time.

Pablo

Hi Pablo,

URL-encoding a plus sign should change it into the character sequence "%2b", so you should still be able to distinguish it from spaces.

E.g.
+<space>+

becomes

%2B+%2B

Is this different to what you're seeing?

Alex

RSS

© 2014   Created by FrontlineSMS Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service