Receiving sms in hex encoding

Receiving sms in hex encoding SearchSearch
Author Message
Alexey
New member
Username: Achrome

Post Number: 1
Registered: 08-2017
Posted on Thursday, August 31, 2017 - 09:28 am:   

I wrote a post-request for C # sending SMS with Russian text.

string url = "http://localhost:8800";
using (var webClient = new WebClient())
{
var pars = new NameValueCollection();
pars.Add("PhoneNumber", "+71234567891");
pars.Add("Text", "Пост запрос");
pars.Add("Binary", "0");
var response = webClient.UploadValues(url, "POST", pars);
string str = System.Text.Encoding.UTF8.GetString(response);

Console.WriteLine(str);
Console.ReadKey();
}

The message came on the phone in Hexadecimal. Tell me how to get SMS with Russian characters?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5861
Registered: 08-2008
Posted on Thursday, August 31, 2017 - 09:37 pm:   

Hi,

The first question I'd ask is if you can send that same text OK from the built-in web form.

If OK, then the issue is that you are not using UTF-8 encoding for the Russian text input. Most likely, you are using KOI8-R...and just add a parameter charset=KOI8-R to tell NowSMS...or convert to UTF-8.

If messages are not OK from the web interface, then we need details about your SMSC connection.

--
Des
NowSMS Support
Alexey
New member
Username: Achrome

Post Number: 2
Registered: 08-2017
Posted on Monday, September 04, 2017 - 06:59 am:   

The development environment C# by default uses UTF-8 encoding - 100%. Perhaps there are any settings in the application itself and it is in it that you need to find the reason?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5863
Registered: 08-2008
Posted on Wednesday, September 20, 2017 - 09:30 pm:   

Apologies for missing your follow-up.

I asked if you can send that same text OK from the built-in web form (in NowSMS). How we troubleshoot the next step depends on that answer.


--
Des
NowSMS Support
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5864
Registered: 08-2008
Posted on Wednesday, September 20, 2017 - 09:36 pm:   

test reply
Alexey
New member
Username: Achrome

Post Number: 3
Registered: 08-2017
Posted on Thursday, September 21, 2017 - 12:36 pm:   

While I can not check - the development was suspended