Skip to content

Smpp Encoding

AdhamAwadhi edited this page Feb 24, 2018 · 4 revisions

Smpp Encoding

  • Use custom encoding for each SmppClient instance

Default encdoing System.Text.Encoding.BigEndianUnicode

    client.SmppEncodingService = new SmppEncodingService(System.Text.Encoding.UTF8);
  • Fix SMSCDefaultEncoding exception issue #4. There are 2 options here:

    You can choose between them by setting UseGsmEncoding property to true (defualt) to use GSM Encoding or to false to use the other.

      JamaaTech.Smpp.Net.Lib.Util.SMSCDefaultEncoding.UseGsmEncoding = true; // or false
    

You can use SmppEncodingService for encoding

    client.SmppEncodingService = new SmppEncodingService();
    
    // OR        
    
    // from https://github.com/mediaburst/.NET-GSM-Encoding/blob/master/GSMEncoding.cs
    var enc = new JamaaTech.Smpp.Net.Lib.Util.GSMEncoding();
    // You can use any class inherits from System.Text.Encoding
    client.SmppEncodingService = new SmppEncodingService(enc);
Clone this wiki locally