what the correct DataCoding for receive messages

.NET library for SMPP protocol
Locked
realbitt
Posts: 4
Joined: Wed Aug 21, 2013 8:35 am

what the correct DataCoding for receive messages

Post by realbitt » Sat Jan 07, 2017 9:32 am

i have service running and connected with local provider , this service receives message from mobile , the problem is how to detect the correct data coding for coming messages .

in my case some times messages comes from users in pure English and some times mixed with Arabic and English .

i know the correct coding for araic is UC2 and if english is Ascii or default Coding , but how to check the message to select the correct Coding ?

my Sample Code

Code: Select all

    Private Sub client_evDeliverSm(ByVal sender As Object, ByVal data As DeliverSm)

        Dim m_Message As String

        'Check if we received Delivery Receipt
        If data.MessageType = MessageTypes.SMSCDeliveryReceipt Then
            'dont do anything for delivery reports
        Else
            'default message 

            data.DataCoding = DataCodings.Default
            m_Message = data.MessageText


        End If

    End Sub
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: what the correct DataCoding for receive messages

Post by alt » Sun Jan 15, 2017 8:37 pm

i think you need to change mapping between SMPP Data Coding and .NET encoding.
http://wiki.inetlab.com/doku.php/smpp/map_encoding
Locked