MultiLingual SMS Sending | S . Y . M . P . H . O . N . Y
  • MultiLingual SMS Sending

    SMS in a regional language is a good concept when local people are considered. Mobile and SMS are getting attention to a great extend. Getting SMS in ones mother tongue will get more attention rather than in English. Advertisements will get more attention to the targeted audience.

    Bulk SMS s are usually send from SMPP accounts . To send an SMS in Hindi or Arabic from a mobile phone is very easy. The network and the Mobile handset will do the required operations. But sending from an SMPP account or from a program running on a PC is different. Here we have to configure the things or define certain encoding schemes.

    Characters in languages such as Arabic, Chinese, Korean, Japanese or Slavic languages (e.g. Russian) must be encoded using the 16-bit UCS 2 Character Encoding (Unicode) .To set these additional parameters we have to edit the User Data Header (UDH) in the SMS.
    SMS text is converted into HexCode and then to unicode and while sending through SMPP again encoded into HTML format.
    SMS gateways allow for the sending and receiving of SMS messages to or from devices.

    Hexcode for most of the languages can be found in www.unicode.org. For Arabic the character ranges from 0600–06FF.

    Coming back to Kannel, for sending a unicode SMS, we need to pass the percentage encoded HEX code as the text and set the appropriate character encoding.

    For example I’m trying to send some hindi text.

    My Text is हमारा भारत

    So first I need to convert this into HEX code.

    You can have an online conversion tool here

    Get the UTF 8 Code points, you can even use UTF 16, depends how specify character set while submitting to Kannel. If you are using UTF-16, You don’t have to specify the char-set.

    So copy the Percent encoding for URIs and create the Kannel Send SMS URL in the following way

    http://yourhost:port/cgi-bin/sendsms?username=yourusername&password=password&to=91xxxxxxxxx&text=%E0%A4%B9%E0%A4%AE%E0%A4%BE%E0%A4%B0%E0%A4%BE%20%E0%A4%AD%E0%A4%BE%E0%A4%B0%E0%A4%A4&from=Jins.in&mclass=1&coding=2&charset=UTF-8

    In PHP you can use the following to do the conversion

    function urlHexEncode($text)
    {
    $string = '';
    for ($i=0; $i < strlen($text); $i++)
    {
    $letter = $text[$i];
    //get the numeric ascii value of the letter
    //convert it to hex and add a percent (%)
    $string .= sprintf('%%%X', ord($letter));
    }
    return $string;
    }

    The only thing is that your phone should support the language.

    Try for your language and post comments.

    Good Luck :)

    Related Posts:

    Tags: , , , , ,

Leave a comment

Get Adobe Flash playerPlugin by wpburn.com wordpress themes