Urlencoding is all you need. A newline (ASCII 10) should be encoded as
%0A. A percent sign (ASCII 37) should be encoded as %25.

Keep in mind that you won't be able to use the whole character set
when sending messages.

Depending on the terminal and software inbetween, you may end with
only a 7-bit subset (AKA the GSM Alphabet) or some sort of ISO-8859.
YMMV, check on the list archives, you'll find hundreds of messages
regarding strange characters instead of this or that accented letter
;)

You may also use UTF-8, but you'll get about half the characters per messge.

Hope it helps,

Alejandro

On 5/27/07, Emiliano Darriba <[EMAIL PROTECTED]> wrote:
Hi all
I am trying to send a string, a newline and other string to a cell
phone. And I also need to send % sign.
I am using 1.4.1 and sendsms GET interface.

If I urlencode the TEXT I get the literal %0A, if I don´t urlencode
it, I get the newline correctly.
If I urlencode the TEXT I get the %, but if I don´t, I get unspected behavior.

Which is the correct way to send these chars, so I can get % and
newline at the same time??

Do I have to urlencode (or rawurlencode) and do something else?
The manual specifies that the text field should be urlencoded.

Any help will be very appreciated

Regards


Emiliano




--
Alejandro Guerrieri
Magicom
http://www.magicom-bcn.net/
LinkedIn: http://www.linkedin.com/in/aguerrieri

Reply via email to