This project is read-only.
1
Vote

Russian letters did not appear correctly

description

Russian letters did not appear correctly. I trying to send english and russian letters with SmppClient . English letters are fine but instead of russian I see somethung like "?<-/??". I tried to put DefaultEncoding to all possible encoding that are in DataCodings class but nothing changed. What should i do?

This is my code:
public bool SendSms(string PhoneNumber , string MessageText ,string ShortNumber)
    {
        SmppClient client = new SmppClient();
        client.Properties.DefaultEncoding = DataCoding.SMSCDefault; 
        client.Properties.InterfaceVersion = InterfaceVersion.v34;
        client.Properties.Host = this._host;
        client.Properties.Port = this._port;
        client.Properties.Password = this._password;
        client.Properties.SystemID = this._userName;

        try
        {
            client.ForceConnect();
        }
        catch 
        {
            return false;
        }

        if (client.ConnectionState == SmppConnectionState.Connected)
        {__
            TextMessage SmsMsg = new TextMessage();
            SmsMsg.DestinationAddress = PhoneNumber;
            SmsMsg.SourceAddress = ShortNumber;
            SmsMsg.Text = MessageText;

            client.SendMessage(SmsMsg);
            client.Shutdown();
           return true;
        }
        else return false;
    }

comments