[PATCH] DLR in EMI/UCP are not decoded to latin1

"Vincent CHAVANIS" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <03e001c6c2b3$bea1b100$9600a8c0@vince>
DLR msgdata in EMI/UCP smsc are not decoded.
When a char with an accent arrives to a DLR like "MSISDN porté"
It will not decode the msg and will result in a non-printable char.
IA5 charset can handle these chars as when we are receiving an MO.
We simply obey the NRC (if needed), then convert it to latin1.

regards

Vincent.

--
Telemaque - 06200 NICE - (FR)
Service Technique/Reseau - NOC 
Developpement SMS/MMS/Kiosques
http://www.telemaque.fr/
[email protected]
Tel : +33 4 93 97 71 64 (fax 68)
dlr_nonlatin1.txt (text/plain, 756 B)
diff -rau /gateway-cvs/gw/smsc/smsc_emi.c /gateway/gw/smsc/smsc_emi.c
--- /gateway-cvs/gw/smsc/smsc_emi.c     2006-04-07 14:54:06.000000000 +0200
+++ /gateway/gw/smsc/smsc_emi.c 2006-08-18 12:21:18.000000000 +0200
@@ -866,6 +872,12 @@
            else
                msg->sms.msgdata = octstr_duplicate(emimsg->fields[E50_AMSG]);
            octstr_hex_to_binary(msg->sms.msgdata);
+
+            /* obey the NRC (national replacement codes) */
+            if (privdata->alt_charset == EMI_NRC_ISO_21)
+                charset_nrc_iso_21_german_to_gsm(msg->sms.msgdata);
+
+            charset_gsm_to_latin1(msg->sms.msgdata);
            bb_smscconn_receive(conn, msg);
        }
        reply = emimsg_create_reply(53, emimsg->trn, 1, privdata->name);
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.