sms

sending sms in hebrew


I'm using sms1.cardboardfish.com to sens smses through the web. I have these datacoding schemes to work with: 0: Flash 1: Normal 2: Binary 4: UCS2 5: Flash UCS2 6: Flash GSM 7: Normal GSM and I want to send it in hebrew. right now I'm sending it in 7: Normal GSM and it comes out scrambled.. Ideas anyone?


Solution

  • Send it in UCS2, which is normal UTF-16 encoding.

    I think this should do the trick:

    >>> a=u"שלום"
    >>> a
    u'\u05e9\u05dc\u05d5\u05dd'
    >>> a.encode("utf_16_be").encode("hex")
    '05e905dc05d505dd'