Welcome! Log In Create A New Profile

Advanced

HttpRequest is UNICODE compatible or not

Posted by sivakrith 
HttpRequest is UNICODE compatible or not
July 24, 2019 04:05PM
Hello,

Using Windev 22

To send SMS using HttpRequest, with syntax

IF HTTPRequest(asURL) = True THEN


asURL is declared as UNICODE String

displaying asURL just before calling HTTPRequest displays the correct message (UNICODE string). HTTPRequest send the message without failing. But instead of displaying the message, I get ????? in my mobile.

Copying the same message and sending it through the web browser, gets the correct UNICODE string in my mobile.

What could be wrong I'm doing ?

Happiness Always
BKR Sivaprakash
Re: HttpRequest is UNICODE compatible or not
July 24, 2019 04:38PM
Hi. Without further information it is difficult to know where the problem is, but I believe the following:

a) The Url should not be in Unicode. If it has special characters use instead the UrlEncode function to prepare the Url.

b) Whoever sends the text in Unicode understands that it is the internet service you are using, not your program, so you should not send it as Unicode.

A greeting

Ruben
Re: HttpRequest is UNICODE compatible or not
July 25, 2019 04:31AM
Thanks Ruben.

The purpose is to send SMS through a web service. Need to call

[abm.gtechsms.in]நன்றி வணக்கம்

Here the message part will be in Unicode. I tried sending this with HTTPRequest, with no success.

How to accomplish this ?

Happiness Always
BKR Sivaprakash
Re: HttpRequest is UNICODE compatible or not
July 25, 2019 07:01AM
Hello,

Seems the http call has changed in the above reply

//http ://abm.gtechsms.in/api/sendhttp.php?authkey=abc&mobiles=9876543210&sender=MYSELF&route=9&country=91&unicode=1&message=நன்றி வணக்கம்


Space after http has been purposefully left to show the full message. In implementation, that space is not there.
Re: HttpRequest is UNICODE compatible or not
July 26, 2019 08:24PM
Hi. Have you tried using UrlEncode like I told you?

[help.windev.com]

It has an option to encode Unicode characters from the Url:

"encodeURLFromUnicode: URL format. The encoded text only contains characters allowed in a URL. The text to encode is a Unicode string."


Ruben
Re: HttpRequest is UNICODE compatible or not
July 29, 2019 01:37PM
Thanks Ruben,

Though help states encodeURLFromUnicode as an option, in my Windev 22 I don't get that option. I get only three options,

encodeURLFromANSI
encodeURLFromUTF8
encodeURLParameter

I didn't get the fourth option encodeURLFromUNICODE. Even if I put that option, Windev reports it as an error.

Happiness Always
BKR Sivaprakash
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: