Turkish message problem

.NET library for SMPP protocol
lolorosso
Posts: 9
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: 889
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: 9
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: 889
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: 9
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: 889
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: 9
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.
alt
Site Admin
Posts: 889
Joined: Tue Apr 25, 2006 9:45 am

Re: Turkish message problem

Post by alt » Tue Jan 19, 2021 7:05 pm

thank you. I'll check this issue.
alt
Site Admin
Posts: 889
Joined: Tue Apr 25, 2006 9:45 am

Re: Turkish message problem

Post by alt » Tue Jan 19, 2021 10:02 pm

Turkish language has both Single and Locking shift tables.

I think in your case you need to use locking shift table.

Code: Select all

.NationalLanguageLockingShift(NationalLanguage.Turkish)
lolorosso
Posts: 9
Joined: Sat Jan 02, 2021 5:31 pm

Re: Turkish message problem

Post by lolorosso » Tue Jan 19, 2021 10:41 pm

Hi,
This problem. Depends on the version.
https://prnt.sc/x8p8b8

Also, when I test NationalLanguageLockingShift in the new version, different problems continue to occur.

IList <SubmitSm> req = submitSmBuilder.Create (smppClient);
The Req value should be 3. but the returned list is 2 parts.

Sample 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 KOLEJİ BXXX

the last character is different. "İ"
alt
Site Admin
Posts: 889
Joined: Tue Apr 25, 2006 9:45 am

Re: Turkish message problem

Post by alt » Wed Jan 20, 2021 6:08 pm

Which versions did you test?

Could you please test with latest https://www.inetlab.com/Download/2.9.0- ... b.SMPP.zip
lolorosso
Posts: 9
Joined: Sat Jan 02, 2021 5:31 pm

Re: Turkish message problem

Post by lolorosso » Wed Jan 20, 2021 7:26 pm

Hi,
1.1.20.4 version I use

when i test the file you sent.
.NationalLanguageLockingShift ok.
The problem persists in NationalLanguageSingleShift.

However my project. It calculates length for NationalLanguageSingleShift.
alt
Site Admin
Posts: 889
Joined: Tue Apr 25, 2006 9:45 am

Re: Turkish message problem

Post by alt » Thu Jan 21, 2021 7:15 pm

I think I found where is the issue.

Please try the version https://www.inetlab.com/Download/2.9.0- ... b.SMPP.zip

How your project calculates the length?
lolorosso
Posts: 9
Joined: Sat Jan 02, 2021 5:31 pm

Re: Turkish message problem

Post by lolorosso » Thu Jan 21, 2021 7:55 pm

I ran the tests, no problem.
This is great.
I use a system suitable for NationalLanguageSingleShift to calculate.

Now my question is, what should I do for the version we have or should I get a new license? If I need to buy a new license.
My project works synchronously. :(
alt
Site Admin
Posts: 889
Joined: Tue Apr 25, 2006 9:45 am

Re: Turkish message problem

Post by alt » Fri Jan 22, 2021 7:22 pm

Version 1.1 is not supported anymore.
I suggest you to upgrade to version 2.9. There are a lot of improvements.
Post Reply