Unicode SMS

Unicode SMS SearchSearch
Author Message
Kiran K
New member
Username: Kirank

Post Number: 6
Registered: 11-2009
Posted on Wednesday, December 02, 2009 - 02:58 pm:   

I want to send sms in many languages through unicode .

How can i send unicode sms?
What data will come in short_message field.

I could send arabic with php iconv() conversion. but cannot send som other lnaguages.

What encoding is to be done here.

If i have one hex code 0D23 corresponding to a unicode char, how this is encoedd..

Please explain briefly, im really stuck with unicode.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1483
Registered: 08-2008
Posted on Wednesday, December 02, 2009 - 09:14 pm:   

Unicode character 0D23 would get encoded as two bytes ... 0D 23 ...
Kiran K
New member
Username: Kirank

Post Number: 7
Registered: 11-2009
Posted on Thursday, December 03, 2009 - 07:08 am:   

Please explain detaily,, do u think i have to encode od and 23 seperately???

I did nt get?
Kiran K
New member
Username: Kirank

Post Number: 8
Registered: 11-2009
Posted on Thursday, December 03, 2009 - 10:30 am:   

Any idea about, how this can be done in php?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1485
Registered: 08-2008
Posted on Thursday, December 03, 2009 - 03:20 pm:   


quote:

do u think i have to encode od and 23 seperately???




It depends on how you look at the short_message parameter. If you are looking at it as an array of bytes, then yes, it is 0D in the first byte, followed by 23 in the second byte.

iconv is working for you with Arabic, correct? And you're not doing anything other than calling iconv?

In that case, you are looking at short_message as a word (16-bit) array, in which case 0D23 is the first word.

If you want to send text in another language, I don't see why you can't still use iconv. You just need to specify the appropriate input character set.

If the input character set is Unicode (UCS-2), then no conversion would be necessary ... just copy it into short_message.
Kiran K
New member
Username: Kirank

Post Number: 10
Registered: 11-2009
Posted on Friday, December 04, 2009 - 06:32 am:   

Thanks

I got another solution. Since customer need to give the unicode codepoint , and i can convert to 16 bit binary using pack("n",hexdec($hex));

It will pack hexcode to binary format.