sanoopsivan / jsmpp

Automatically exported from code.google.com/p/jsmpp
Apache License 2.0
0 stars 0 forks source link

how to receive arabic message through short code? #31

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
i am trying to receive arabic responce from user using jsmpp. but i am 
unable to decode the string sent by the user can you please send an 
example in order to read responce from user in arabic?. 

Original issue reported on code.google.com by waseem%a...@gtempaccount.com on 14 May 2009 at 2:57

GoogleCodeExporter commented 8 years ago
AFAIK (ref GSM ETSI TS 100 900 v7.2.0) Arabic gets coded in UCS2 format. Check
alphabet of coding (bit 2, 3) . If it's 10b (2) then decode text from UCS2. 
That's
equal to UTF-16BE in Java. as follows:

if(((coding & 12) >> 2) == 2) 
final String arabicText = new String(bytes, "UTF-16BE");

hope it helps. 
BTW u may use mailing list.

Original comment by a.abbasp...@gmail.com on 16 May 2009 at 5:12

GoogleCodeExporter commented 8 years ago
resolved thanks.

Original comment by waseem%a...@gtempaccount.com on 16 May 2009 at 7:38

GoogleCodeExporter commented 8 years ago

Original comment by uuda...@gmail.com on 18 Aug 2009 at 10:50