Hi Ajay,
Ajay Kanukuntla schrieb:
Hi Lars-Hendrik
I did this and I can see the translated string %3D in the message. Even on
the kannel log, I see that the message having = symbol is delivered.
But when I physically get the SMS on my phone, it breaks up from where the
= is starting. I cant see the entire message on phone...
I am using following java code, sample output is pasted below.
System.out.println("Before encode URL: " + message.MESSAGE_TEXT);
message.MESSAGE_TEXT = URLEncoder.encode(message.MESSAGE_TEXT);
System.out.println("After encode URL: " + message.MESSAGE_TEXT);
Before encode URL: An Astronomer = was
After encode URL: An+Astronomer+%3D+was
mmh, I just tested it using this:
Message:
a simple test: 5 plus 3 = 8!
$message = urlencode($_REQUEST["message"]);
This is the string afterwards:
$string =
"http://localhost:13002/cgi-bin/sendsms?username=my&password=secret&to=+4912345&text=a+simple+test%3A+5+plus+3+%3D+8%21"
Using GET with exec in PHP to send the string:
$get = exec("GET ".$string."", $result);
and smsbox-log says then:
2006-02-23 12:47:47 [7333] [3] INFO: sendsms sender:<www:+4954321>
(127.0.0.1) to:< 4912345> msg:<a simple test: 5 plus 3 = 8!>
using kannel 1.4.0
The result on the mobile phone was: a simple test: 5 plus 3 = 8!
So, for me it works here (but as you see I use PHP and GET and not Java ...)
Regards,
Lars-Hendrik
Thanks
Ajay
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Lars-Hendrik Schneider
Sent: Thursday, February 23, 2006 2:53 PM
To: [email protected]
Subject: Re: How to send = symbol in the message
Hi Ajay,
Ajay Kanukuntla schrieb:
Hi
I am trying to send equals symbol (=) in my message using Kannel
Gateway, but when I receive on the phone, I don't see any characters
after equal = symbol including the equals = itself.
Can somebody please help me here???
how to you prepare / send your message?
If you use http-requests to send your message make sure to urlencode the
message before delivering.
Example:
<?php
$text = "5 plus 3 = 8";
$text = urlencode($text);
echo $text;
?>
will show: 5+plus+3+%3D+8
As you see the "=" is converted to %3D. This should work then in here:
http://localhost:13000/cgi-bin/sendsms?username=my&password=secret&to=+49123
45&text=
5+plus+3+%3D+8
Hth,
Lars-Hendrik