Hi,

            I am trying to send chinese characters from an application to the Mobile phone using SMPP protocol in the kannel with some older version of kannel i.e 1.0.

            What I know is that if we have to send Unicoded data we just send is any other binary data and set the data_coding feild to 8 and send it. The server understands it as a unicodinbg and interprets accordingly.

In the code this thing is handled as following ( I am giving the portion of the code  because the version I am using is too old 1.0 )
 

        if(msg->smart_sms.flag_udh == 1) {
                /* As per GSM 03.38. */
                submit_sm->data_coding = 245;
        } else {
 
                submit_sm->data_coding = 8;  // This 8 is for Unicoding
                //submit_sm->data_coding =3;  // For normal ASCII this is 3
         }

        strncpy(submit_sm->source_addr, octstr_get_cstr(msg->smart_sms.sender), 21);
        strncat(submit_sm->dest_addr, octstr_get_cstr(msg->smart_sms.receiver), 21);

        submit_sm->sm_length = octstr_len(msg->smart_sms.udhdata) +
                octstr_len(msg->smart_sms.msgdata);

        octstr_get_many_chars(submit_sm->short_message, msg->smart_sms.udhdata, 0, 160);

        octstr_get_many_chars(
                submit_sm->short_message + octstr_len(msg->smart_sms.udhdata),
                msg->smart_sms.msgdata, 0, 160 - octstr_len(msg->smart_sms.udhdata));

        charset_iso_to_smpp(submit_sm->short_message);  // Do we need this function or shall we send the data just as binary data and set the data_coding = 8 as above and drop this function.
 

Can any one suggest me what else I am required to do. Because finally I am not able to see the characters on my phone.
 

Thanks in advance
Bimalendu Choudhary

-- 
Bimalendu Choudhary
Delhi
 


Reply via email to