1

I am trying to send the message through com port using MScom in VB6. although simple message in english is sending is ok. But when I send the urdu language test then it send? marks. my port setting

With MSComm1
        .CommPort = port
        .Settings = "9600,N,8,1"
        .Handshaking = comRTS
        .RTSEnable = True
        .DTREnable = True
        .RThreshold = 1
        .SThreshold = 1
        .InputMode = comInputModeBinary 'comInputModeText
        .InputLen = 0
        .PortOpen = True 'must be the last
    End With 

I use urdutextbox for writing message

borchvm
  • 3,533
  • 16
  • 44
  • 45
  • What are you using to detect the output from the com port? – spodger Feb 20 '19 at 10:16
  • 2
    Are you talking about sending SMS via a GSM Modem + AT commands? If so you need to communicate with the device in PDU/binary mode, text mode is for the 7-bit alphabet that supports only basic latin characters. – Alex K. Feb 20 '19 at 10:29
  • i am using GSM modem and sending sms through AT command, with binary code message send but display ??????? ativing end – Tauqeer Shah Feb 20 '19 at 17:07
  • Basically i want to send message in unicode like السامعلیکم . – Tauqeer Shah Feb 20 '19 at 17:16
  • You may be better off using a library that supports PDU mode like http://www.scampers.org/steve/sms/libraries.htm – Alex K. Feb 21 '19 at 11:52

1 Answers1

0

Basically, I underwent through the same processes below in trying to develop a multilingual VB6 app in Chinese, German, Japanese and Dutch and was successful so I'll share it with you except it will be for Urdu language.

  1. Firstly, you will need to install the Hindi/Urdu Language Pack for Microsoft Windows to add that language to your Windows OS. Test that this is successfully installed by changing the Language settings so that you can see some Urdu text displayed in your system screens and that you can cut and paste Urdu in VB6 instead of it showing the question marks.

  2. Make sure you are using Unicode type strings.

  3. If you are using Access, make sure you can successfully store Urdu text in the database tables which should be showing Urdu text instead of the ??? (I did also get the ??? until I installed the Windows Language Packs for the languages concerned and used Unicode).

  4. If you are using VB6 textboxes, make sure that Fonts are Unicode. Test that it can display the Urdu text.

Ezani
  • 535
  • 3
  • 18