$ and @ characters data coding

Post Reply
aordonez
Posts: 21
Joined: Wed Jun 05, 2019 11:40 am

$ and @ characters data coding

Post by aordonez » Thu Jul 15, 2021 3:29 pm

Hi, I have some problems submitting messages using Default Coding (GSM) the provider tell me that the SMPP v3. 4 Protocol Implementation guide for GSM / UMTS said:
"Using financial symbols in a short message
By default the LATIN-1 and the GSM-alphabet allow the displaying of the following financial
signs: Dollar $, Pound £, Yen ¥. The LATIN-1 field data needed to display these characters
in the same sequence on a mobile would be:
0x24 0xA3 0xA5 (converted to GSM: 0x02 0x01 0x03)
What about the Euro sign €? It is not present in the GSM default alphabet, but it is supported
via the earlier mentioned GSM alphabet escape character method. For the Euro sign to be
included in the SMPP PDU it must be converted by the ESME to 0x1B 0x65.
As the Euro sign is on position A4 in ISO LATIN-9 some implementations may use this code
to display the Euro sign. When an Euro sign is entered in a Windows application, the Euro
sign will be represented by 0x80 and a conversion has to take place to 0x1B 0x65.
NOTE: Making use of the escape character implies that two character positions are used for
displaying one character (a message containing only Euro signs will have the capacity of 80
characters).
[/color]"
But I see that we are sending 0x02 and 0x03, Hoy can we resolve this?
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: $ and @ characters data coding

Post by alt » Fri Jul 16, 2021 10:54 am

You need to change .NET encoding for Latin1 data coding in the client encoding mapper:

Code: Select all

client.EncodingMapper.MapEncoding(DataCodings.Latin1, new Inetlab.SMPP.Encodings.GSMEncoding());
aordonez
Posts: 21
Joined: Wed Jun 05, 2019 11:40 am

Re: $ and @ characters data coding

Post by aordonez » Fri Jul 16, 2021 6:00 pm

Hi I appreciate your help.
I already did that, but still see the 0x02 and 0x03. I missing something?
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: $ and @ characters data coding

Post by alt » Mon Jul 19, 2021 9:24 am

If you want to send "$£¥€" as 0x24A3A5A4 in Default data coding, you need to change the mapping this way:

Code: Select all

client.EncodingMapper.MapEncoding(DataCodings.Default, new System.Text.Encoding(1252));
and when you send the message you need to use DataCodings.Default.

The same way you can set the encoding for DataCodings.Latin1.
aordonez
Posts: 21
Joined: Wed Jun 05, 2019 11:40 am

Re: $ and @ characters data coding

Post by aordonez » Mon Jul 19, 2021 11:54 am

I get it, I do System.Text.Encoding.GetEncoding but 1252 is not supperted by net core
alt
Site Admin
Posts: 985
Joined: Tue Apr 25, 2006 9:45 am

Re: $ and @ characters data coding

Post by alt » Mon Jul 19, 2021 4:18 pm

Post Reply