Hi, I am building a code to send SMS messages via access. The code is working fine when sending English text. The problem I have refers to the greek text. When I send a Greek message, the result is ????
The first option is to be able to convert the message to UTF-8, for example the Greek "Α" should be equal to %CE%91.
Does anyone have any code on this?
Alternatively, is their anyway to set the url which is posted to UTF-8 or code page 65001.
Below is the code I use to send the message.
The first option is to be able to convert the message to UTF-8, for example the Greek "Α" should be equal to %CE%91.
Does anyone have any code on this?
Alternatively, is their anyway to set the url which is posted to UTF-8 or code page 65001.
Below is the code I use to send the message.
Code:
Option Compare Database Sub sendSMS() 'Added Reference Microsoft XML v 6.0' Dim RsRec As Recordset Set RsRec = CurrentDb.OpenRecordset("SELECT SMSTO, SMSMESSAGE FROM SMS_WIP WHERE SMSUSER='ANDREAS';") Dim strResult As String Dim URL_base As String Dim str_POST As String Dim XMLHttpRequest As XMLHTTP Set XMLHttpRequest = New MSXML2.XMLHTTP 'example 'http://www.microsms.net/sendapiinter.asp?usr=frangxxxxxx@lwb.org.cy&psw=xxxxxx&mobnu=35799xxxxxx&title=Petros&message=ΚΑΛΗΜΕΡΑ' URL_base = "http://www.microsms.net/sendapiinter.asp?" Do While RsRec.EOF = False str_POST = URL_base & _ "usr=" & "frangΧΧΧΧ@gmail.com" & _ "&psw=" & "ΧΧΧΧΧΧΧ" & _ "&mobnu=" & "35799123456" & _ "&title=" & "TEST" & _ "&Batchid=" & "200" & _ "&Dtype=" & "4" & _ "&message=" & StrConv(RsRec.Fields("SMSmessage").Value, vbUpperCase) Debug.Print str_POST XMLHttpRequest.Open "GET", str_POST, False XMLHttpRequest.send ' next record RsRec.MoveNext Loop End Sub
Comment