Euro sign with Latin1 encoding

.NET library for SMPP protocol
Locked
eft
Posts: 1
Joined: Wed Nov 16, 2016 9:56 am

Euro sign with Latin1 encoding

Post by eft » Wed Dec 14, 2016 6:28 pm

I create a small smpp server. One of my clients use the following encoding http://www.developershome.com/sms/gsmAlphabet.asp
On my server instead of receiving the euro 1B65 i received it hex 65. Hex 65 it's the small letter e.
Can anyone advice me?

Below it;s a piece of code on clientconencted.
I have tested all the possible encoding compinations...

void server_evClientConnected(object sender, Inetlab.SMPP.Common.SmppServerClient client)
{
GenericFunc func = new GenericFunc();

try
{
client.evDeliverComplete += OnDeliverSmResp;

// client.MapEncoding((DataCodings)57, new GSMEncoding());

// DataCodings cde = new DataCodings();
// client.GetMappedEncoding(cde);

// if (cde == (DataCodings)57)
// client.MapEncoding((DataCodings)51, System.Text.Encoding.BigEndianUnicode);
// else

//client.MapEncoding((DataCodings)51, new Inetlab.SMPP.Encodings.GSMEncoding());

client.MapEncoding(DataCodings.Latin1, new Inetlab.SMPP.Encodings.GSMEncoding());

client.NeedEnquireLink = true;

//Create message composer instance for connected client. It helps to get full text of the concatenated message in the method OnFullMessageReceived
MessageComposer composer = new MessageComposer(client);
composer.evFullMessageReceived += OnFullMessageReceived;
composer.evFullMessageTimedout += OnFullMessageTimedout;
lock (_composers)
{
_composers.Add(client, composer);
}

// _log.Info(String.Format("Client {0} connected.", client.RemoteEndPoint));

if (client.ClientCertificate != null)
{
// _log.Info(String.Format("Client Certificate {0}, Expire Date: {1}", client.ClientCertificate.Subject, client.ClientCertificate.GetExpirationDateString()));
}


func.WriteLog("server_evClientConnected: " + client.RemoteEndPoint);
}
catch(Exception ex)
{

func.WriteLog("Error server_evClientConnected: " + ex.ToString());
}
}

Thanks in advance
Eft
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: Euro sign with Latin1 encoding

Post by alt » Wed Jan 18, 2017 4:29 pm

Hi eft,

did you check that client sends correct short message?
Could you enable trace for the library and send me submit_sm packet data?

http://wiki.inetlab.com/doku.php/smpp/tracing
Locked