Character Property

Description:

The Character property specifies the type of character encoding to be used for sending text messages.

   

Usage
  • ObjectName.Character = intCharacter
  • intCharacter = ObjectName.Character
Value Type Integer
Access Mode Read/Write
Valid Values
  • 0 - 7-Bit Default GSM Character Encoding (Maximum 160 characters per message)
  • 1 - 8-Bit ANSI Character Encoding (Maximum 140 characters per message)
  • 2 - 16-Bit Unicode Character Encoding (Maximum 70 characters per message)
Default Value 0
Remarks
  • When sending messages using 7-bit encoding, you must ensure that the characters used are limited to the ones defined in 7-bit default alphabet. If a character used is not as per 7-bit default alphabet then it will be replaced by '?' (question mark) symbol.
  • Certain characters (e.g. ^{}[]\~ ) are 14-bits long (as per 7-bit default alphabet defined by GSM 03.38) and therefore are equivalent to two characters when used in text messages with 7-bit encoding.
  • If you use 8-bit character encoding then you must ensure that each character used in the text message is restricted to 8-bit size or else the message will not be displayed correctly by the recipient's mobile phone

Usage Example:

Visual Basic / ASP (VBScript)
Dim objSMS As mCore.SMS
Set objSMS = New mCore.SMS
' You can also use Set objSMS = CreateObject("mCore.SMS")
' In case of ASP (VBScript) to create object use
' Set objSMS = Server.CreateObject("mCore.SMS")
' In ASP use Response.Write instead of MsgBox
objSMS.Port = "COM2"
objSMS.BaudRate = 57600
objSMS.Parity = "N"
objSMS.DataBits = 8
objSMS.StopBits = "1"
objSMS.Character = 0
objSMS.SendSMS "+919873094767", "Hello World!"
If objSMS.ErrorCode = 0 Then
     MsgBox "Message Sent!"
Else
     MsgBox "Error " & CStr(objSMS.ErrorCode) & _
            ": " & objSMS.ErrorDescription
End If
Set objSMS = Nothing

   

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved