Turkish message problem

.NET library for SMPP protocol
Post Reply
lolorosso
Posts: 4
Joined: Sat Jan 02, 2021 5:31 pm

Turkish message problem

Post by lolorosso » Sat Jan 02, 2021 5:32 pm

Hi,

I'm trying to send a Turkish message with inetlab.
I'm having problems.
Can you help me.
alt
Site Admin
Posts: 882
Joined: Tue Apr 25, 2006 9:45 am

Re: Turkish message problem

Post by alt » Thu Jan 07, 2021 8:20 pm

Hi lolorosso,

what kind of problem are you facing?
how do you send the message? Could you post the code here?
lolorosso
Posts: 4
Joined: Sat Jan 02, 2021 5:31 pm

Re: Turkish message problem

Post by lolorosso » Sat Jan 16, 2021 6:42 pm

Hi,

The message is split into 149 characters.

My Code:

Code: Select all

ISubmitSmBuilder submitSmBuilder = SMS.ForSubmit()
                .From(submitMessageParameters.Originator, (byte)submitMessageParameters.OrigTON, (byte)submitMessageParameters.OrigNPI)
                .To(submitMessageParameters.Destination, (byte)submitMessageParameters.DestTON, (byte)submitMessageParameters.DestNPI)
                .Coding(DataCodings.Latin1)
                .Text(submitMessageParameters.SMText)
                .ExpireAt(submitMessageParameters.ValidityPeriod)
                .DeliveryReceipt();

            if (submitMessageParameters.MessageType == MessageType.turkcesms)
            {
                submitSmBuilder.NationalLanguageSingleShift(NationalLanguage.Turkish);
            }

            IList<SubmitSm> req = submitSmBuilder.Create(smppClient);
            
alt
Site Admin
Posts: 882
Joined: Tue Apr 25, 2006 9:45 am

Re: Turkish message problem

Post by alt » Mon Jan 18, 2021 7:43 pm

Could you provide more details about the issue?

What text did you sent?

What message text the recipient sees on the phone?

What type of .NET encoding did you map to DataCoding.Latin1?
https://docs.inetlab.com/smpp/v2.8/arti ... oding.html

Does your SMS provider support National language shift table?
https://en.wikipedia.org/wiki/GSM_03.38 ... ift_tables
lolorosso
Posts: 4
Joined: Sat Jan 02, 2021 5:31 pm

Re: Turkish message problem

Post by lolorosso » Mon Jan 18, 2021 7:54 pm

Hi,
My SMS provider supports National language shift chart
When I want to send a message in Turkish, the message fragments become 149 characters.

Can you share a sample code to send a long message in Turkish.

Thank you.
alt
Site Admin
Posts: 882
Joined: Tue Apr 25, 2006 9:45 am

Re: Turkish message problem

Post by alt » Mon Jan 18, 2021 8:28 pm

Using a shift table, a message can still use 7-bit encoding for the characters, but a different set can be chosen to correctly show accented and language specific characters. This allows up to 155 characters, encoded in 136 octets (140 octets, minus the 4-octets of User Data Header required to indicate the use of a shift table and the language code). With both Locking and Single shift tables, up to 152 characters are allowed, encoded in 133 octets (140 octets, minus 7-octets User Data Header).
The number of characters depends on the message content. What length are you expecting?
Please also answer on all questions above.
lolorosso
Posts: 4
Joined: Sat Jan 02, 2021 5:31 pm

Re: Turkish message problem

Post by lolorosso » Mon Jan 18, 2021 9:32 pm

Hi

MessageText: Özel XXXXX XXXX Koleji Düzey Belirleme Sınavı'na sinav.xxxxxxxxxxxxxxxxxx.com adresi üzerinden giriş yapabilirsiniz. Kullanıcı adı kısmına "ÖĞRENCİNİN TC KİMLİK MUMARASI", şifre kısmına "000000" yazarak sınavınıza giriş yapabilirsiniz. Başarılar dileriz. ÖZEL XXXX KOLEJI BXXX

Code: Select all

            ISubmitSmBuilder submitSmBuilder = SMS.ForSubmit()
                .From(submitMessageParameters.Originator, (byte)submitMessageParameters.OrigTON, (byte)submitMessageParameters.OrigNPI)
                .To(submitMessageParameters.Destination, (byte)submitMessageParameters.DestTON, (byte)submitMessageParameters.DestNPI)
                .Coding(DataCodings.Default)
                .Text(submitMessageParameters.SMText)
                .ExpireAt(submitMessageParameters.ValidityPeriod)
                .DeliveryReceipt();

                submitSmBuilder.NationalLanguageSingleShift(NationalLanguage.Turkish);

            IList<SubmitSm> req = submitSmBuilder.Create(smppClient);
For req, it returns 3 SubmitSm. It should be 2.
We are having trouble calculating before sending it to the operator.
Post Reply