diff -Nru gw/smsc/smsc_smpp.c.orig gw/smsc/smsc_smpp.c
--- gw/smsc/smsc_smpp.c.orig    2006-05-12 23:43:20.000000000 -0600
+++ gw/smsc/smsc_smpp.c 2006-05-12 23:48:10.000000000 -0600
@@ -1286,6 +1286,8 @@
          * The DLR trigger URL is indicated by msg->sms.dlr_url.
          */
         dlrmsg->sms.msgdata = octstr_duplicate(respstr);
+        //Remove null terminated characters in the middle of msgdata
+        rm_nullt_from_octstr(dlrmsg->sms.msgdata);
         dlrmsg->sms.sms_type = report_mo;
     } else {
         error(0,"SMPP[%s]: got DLR but could not find message or was not interested "
diff -Nru gwlib/charset.c.orig gwlib/charset.c
--- gwlib/charset.c.orig        2006-05-12 23:36:39.000000000 -0600
+++ gwlib/charset.c     2006-05-12 23:43:15.000000000 -0600
@@ -327,6 +327,17 @@
     xmlCleanupEncodingAliases();
 }

+void rm_nullt_from_octstr(Octstr *ostr)
+{
+    long pos, len;
+    len = octstr_len(ostr);
+    for (pos = 0; pos < len; pos++) {
+        int c, new, i;
+        c = octstr_get_char(ostr, pos);
+        if (c == 0)
+            octstr_delete(ostr, pos, 1);
+    }
+}

 void charset_gsm_to_latin1(Octstr *ostr)
 {

