Return message

Return message SearchSearch
Author Message
cwtan
Unregistered guest
Posted on Thursday, April 22, 2004 - 08:21 am:   

i have program to return message via nowsms gateway and i have success to received the message, but the space in the message has been replaced by "+" sign, eg. "Thank you" became "Thank+you". Please anyone can tell me how to return the message without "+" sign.
Thank.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2357
Registered: 10-2002
Posted on Thursday, April 22, 2004 - 05:35 pm:   

NowSMS passes received message text to a 2-way command as a GET string in a URL request.

Space characters are not valid in a URL request, so they have to be escaped as "+".

This is standard URL escaping, so most scripting languages unescape the string in their parameter parsing.

If you do have to parse the URL manually, note the following ...

  • "+" is unescaped to a space character
  • If a "%" character is present, this indicates that two hex digits follow, representing the hex value of the character code being escaped. For example, if a "+" character appeared in text, it would be sent over HTTP as "%2B". So "%2B" in a URL parameter would be unescaped to "+".


Some of the more common escape sequences for characters can be found in a chart at the bottom of the following page:

http://www.nowsms.com/documentation/ProductDocumentation/sending_messages/url_pa rameters_for_sending_messages.htm
YamyNg
New member
Username: Yamyng

Post Number: 2
Registered: 04-2004
Posted on Friday, April 23, 2004 - 04:47 am:   

i do not understand the explanation above. now my problem is sending an sms from nowsms to a mobile that all "space" is replaced by a "+" symbol. how do i remove this symbol "+" and the spacing is a normal blank.

i've tried %20 in my coding but unsuccessfully. i receive sms as "%20" and not a blank space. any help is much appreciated. thanks.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2388
Registered: 10-2002
Posted on Saturday, April 24, 2004 - 12:16 am:   

And I'm sorry, but I don't understand your question.

I think I need more detail about your configuration. Are you connecting to an HTTP based SMSC? (Even if you were, I see that we escape space as "%20" when we connect to an HTTP-based SMSC.)

Perhaps it would help me understand what you are experiencing if you could enable the debug log in NowSMS. Manually edit SMSGW.INI, and under the [SMSGW] section header, add Debug=Yes. Then restart the NowSMS service. Repeat the sending of the problem message.

Reply back with the content of the SMSDEBUG.LOG (or send it via e-mail to nowsms@now.co.uk).

-bn
YamyNg
New member
Username: Yamyng

Post Number: 4
Registered: 04-2004
Posted on Saturday, April 24, 2004 - 03:01 am:   

I'm submit HTTP post to nowsms for sending out sms to mobile, but when the sms received and display on mobile, the sms blank space become '+' symbol. I use parameter "Text" for my message.
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 2397
Registered: 10-2002
Posted on Wednesday, April 28, 2004 - 04:09 pm:   

Are you using HTTP POST or GET?

If you are using HTTP POST, there was an issue where we were not converting '+' to space properly. (The v5.50 beta release resolves this, download at http://www.nowsms.com/download/nowsms550.exe.)

All of our forms use HTTP GET. Do you encounter this problem when you send a message through our web form? Or is it only when you perform your own submit?

Could I see the SMSDEBUG.LOG that I referenced in my previous reply? That would help me understand ...