Sending and apostrophe (') with various DCS values

Sending and apostrophe (') with various DCS values SearchSearch
Author Message
Chris
New member
Username: Chrisc

Post Number: 20
Registered: 12-2008
Posted on Monday, January 04, 2010 - 09:37 am:   

Hi guys

We have an issue with sending apostrophes through NowSMS.

At first we thought we're not encoding the character correctly, but when using different DCS values, we seem to be receiving the message correctly.

This is an SMPP excerpt when sending DCS=0:

16:47:40:875 (000008A0) 193.132.40.160 ->: 00 00 00 47 00 00 00 04 00 00 00 00 00 00 00 0B G
16:47:40:875 (000008A0) 193.132.40.160 ->: 00 01 01 53 69 6D 6F 6E 00 01 01 34 34 37 39 37 Simon 44797
16:47:40:875 (000008A0) 193.132.40.160 ->: 39 30 38 30 32 31 35 00 00 00 00 00 00 01 00 00 9080215
16:47:40:875 (000008A0) 193.132.40.160 ->: 00 15 4F 32 20 77 6F 6E 60 74 20 4E 6F 77 53 4D O2 won`t NowSM
16:47:40:875 (000008A0) 193.132.40.160 ->: 53 20 44 43 53 30 30 S DCS00

And when sending something else (DCS=01 in this case):

16:47:52:328 (000008A0) 193.132.40.160 ->: 71 byte packet
16:47:52:328 (000008A0) 193.132.40.160 ->: 00 00 00 47 00 00 00 04 00 00 00 00 00 00 00 0D G
16:47:52:328 (000008A0) 193.132.40.160 ->: 00 01 01 53 69 6D 6F 6E 00 01 01 34 34 37 39 37 Simon 44797
16:47:52:328 (000008A0) 193.132.40.160 ->: 39 30 38 30 32 31 35 00 00 00 00 00 00 01 00 01 9080215
16:47:52:328 (000008A0) 193.132.40.160 ->: 00 15 4F 32 20 77 6F 6E 27 74 20 4E 6F 77 53 4D O2 won't NowSM
16:47:52:328 (000008A0) 193.132.40.160 ->: 53 20 44 43 53 30 31 S DCS01

Due to the specifications provided to us from O2, we have to use a DCS value of 0 to submit messages. But it seems to us that sending an apostrophe goes through as a grave accent character. Can you provide us some more insight as to why this is happening?

Thanks
Chris}
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1613
Registered: 08-2008
Posted on Monday, January 04, 2010 - 02:01 pm:   

Hi Chris,

I'm not sure that I'm following you.

In the first case, it shows a ` character being sent, and in the second case, it shows a ' character being sent.

If you are cutting and pasting out of a word processor, many word processors default to converting ' to ` for some reason.

I'm not sure that the DCS value is relevant here ... but I can't say for sure as I don't really have the complete picture.

Regarding DCS value of 1 vs. 0, in SMPP, the value 1 indicates that GSM/IA5 character set encoding is being used. That is the character set that NowSMS will use by default ... and by default, NowSMS will encode it with a DCS value of 0. (If you select GSM as the SMSC Character Set in the advanced settings, then we use a DCS value of 1 instead.)

I don't think I'm giving you any answers here, so if you're still not making any progress in sorting this, let's take a look at the complete path of the message, starting with its entry point to NowSMS. (If submitted via HTTP, we could see the URL encoding in the SMSDEBUG.LOG.)

--
Des
NowSMS Support
Chris
New member
Username: Chrisc

Post Number: 21
Registered: 12-2008
Posted on Monday, January 04, 2010 - 02:29 pm:   

Hi Des

We sent the messages using the same ' character but when looking at the logs we found the ' and ` characters when using different DCS values.

The interesting thing to note, is that we're using the Roman-8 character set for these particular binds (I requested you guys put a change into NowSMS for us).

Does this make any sort of difference?

We do submit our messages to NowSMS using HTTP. Here's an example:

http://localhost:8800/ReceiptRequested=Yes&Sender=%2b447521711375&PhoneNumber=44 7521711375&DCS=0&Text=Don't+should+have+an+apostrophe&SMSCRoute=SMPP-O2-PC&Valid ity=1D0H0M

In this particular case the message is sent as "Don t should have an apostrophe"
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1615
Registered: 08-2008
Posted on Monday, January 04, 2010 - 02:57 pm:   

Hi Chris,

Yes, the Roman-8 encoding is most likely the culprit here.

We only apply the SMSC charset encoding if DCS=0.

This appears to be an error in our conversion chart. If we encounter ` on a received message using the Roman8 character set, it was to be mapped to ' ... but not the other direction.

That is a mistake. It should be an easy fix. I need to check to see if we can just patch SMSSMPP.DLL, or it needs a complete updated package.

--
Des
NowSMS Support
Chris
New member
Username: Chrisc

Post Number: 22
Registered: 12-2008
Posted on Monday, January 04, 2010 - 03:06 pm:   

Hi Des

It's good to hear we've found the cause of the issue.

Just a quick question on this front then. Wouldn't it be better suited to have the ' character mapped to be the ' character anyway?

Thanks
Chris
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 1631
Registered: 08-2008
Posted on Tuesday, January 05, 2010 - 10:17 pm:   

Hi Chris,

A follow-up. The Roman-8 support is relatively new, so there are no DLL version compatibilities to worry about.

Rather than a full download, here's a link for a ZIP file that contains an updated SMSSMPP.DLL.

http://www.nowsms.com/download/smssmpp.zip

Stop the NowSMS service. Replace the SMSSMPP.DLL in the Program Files\NowSMS directory with this version, and then restart the service.

--
Des
NowSMS Support