Why smppdebug log not show correct characters?

Why smppdebug log not show correct characters? SearchSearch
Author Message
peter chanq
Frequent Contributor
Username: Qqblog

Post Number: 51
Registered: 10-2012
Posted on Tuesday, September 15, 2015 - 06:57 am:   

nowsms (smsc charset=default) -> external smpp server

i used the web interface to send unicode (hello你好hello)

12:26:14:699 (00000180) 10.1.xx.xx ->: 00 18 00 68 00 65 00 6C 00 6C 00 6F 4F 60 59 7D h e l l oO`Y}
12:26:14:699 (00000180) 10.1.xx.xx ->: 00 68 00 65 00 6C 00 6C 00 6F h e l l o

smsdebug log
13:45:55:089 [19] UTF8StringRequiresUnicodeEncoding: Translate to/from GSM string results in loss of data
13:45:55:089 [19] UTF8StringRequiresUnicodeEncoding: hello你好hello

smsout log
2015-09-15 13:45:56,55F79CC8,192.168.xx.xx,8529xxxxxxx,OK -- SMPP - 10.1.x.x:2775,SMSCRouteName=10.1.x.x;Sender=win;SMSCMsgId=2c26d9c8-9c6e-470b-9fb 7-e287700ac3c4;DCS=8;Text="hello你好hello"

why unicode is displayed as "oO`Y}" (hexcode=6F4F60597D) in smpp log?

Actually, my problem is that the external smpp server received "oO`Y}" (hexcode=6F4F60597D) instead of the original unicode character that i typed 你好 (hexcode=4F60597D).}
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 5446
Registered: 08-2008
Posted on Tuesday, September 15, 2015 - 07:22 pm:   

Hi Peter,

The SMPPDEBUG.LOG just does a hex dump of the packet, and as part of that, it displays what the character codes would represent in 7-bit ASCII. The ASCII codes are just intended as an aid to help decode the raw packet.


quote:

Actually, my problem is that the external smpp server received "oO`Y}" (hexcode=6F4F60597D) instead of the original unicode character that i typed 你好 (hexcode=4F60597D)




Not exactly...the 6F is the o character from hello. Remove that and it leaves you with hexcode=4F60597D, which his an exact match.

Have you sent other Unicode characters successfully via this SMPP server? It would appear that it does not recognize that the message is encoded as Unicode and is treating the text as ASCII. To signal that the message is encoded as Unicode, NowSMS sets data_coding=8 (DCS) in the SMPP packet. My best guess is that the SMPP provider does not support Unicode content, so I would inquire with them about whether or not they support Unicode SMS.

--
Des
NowSMS Support