SMPP Patch for data_coding: 3

Michael Zervakis <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Dear all,

    We connect to a SMPP SMSC using kannel and we had problems reading 
greek characters when data coding was set to 3. I attached the 
modifications to gw/smsc/smsc_smpp.c that solved the problem.

Regards
smsc_smpp_patch.txt (text/plain, 1 KB)
Index: gw/smsc/smsc_smpp.c
===================================================================
RCS file: /home/cvs/gateway/gw/smsc/smsc_smpp.c,v
retrieving revision 1.106
diff -u -r1.106 smsc_smpp.c
--- gw/smsc/smsc_smpp.c 16 Sep 2008 20:50:09 -0000      1.106
+++ gw/smsc/smsc_smpp.c 3 Oct 2008 09:09:41 -0000
@@ -519,6 +519,7 @@
             break;
         case 0x01: /* ASCII or IA5 - not sure if I need to do anything */
         case 0x03: /* ISO-8859-1 - do nothing */
+           charset_gsm_to_utf8(msg->sms.msgdata);
             msg->sms.coding = DC_7BIT; break;
         case 0x02: /* 8 bit binary - do nothing */
         case 0x04: /* 8 bit binary - do nothing */
@@ -669,6 +670,7 @@
             break;
         case 0x01: /* ASCII or IA5 - not sure if I need to do anything */
         case 0x03: /* ISO-8859-1 - do nothing */
+           charset_gsm_to_utf8(msg->sms.msgdata);
             msg->sms.coding = DC_7BIT; break;
         case 0x02: /* 8 bit binary - do nothing */
         case 0x04: /* 8 bit binary - do nothing */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.