Open niksabaldun opened 2 years ago
OK, there is probably no problem with the codec itself. I've found the following in the Apache Camel docs:
Choosing the value 0 for the alphabet selects the SMSC default alphabet, this usually means GSM 3.38 but it is not guaranteed.
This is an unbelievably loose specification. For this particular SMSC, default encoding is ascii. However, the web SMPP client I used didn't even try to use gsm0338, so I assume it had some way to detect that it should use ascii. How, I have no idea.
I got this answer from SMSC vendor:
Unfortunately, unlike SMPP 3.3, where data_coding=0 was unambiguously GSM 7-bit default alphabet, for SMPP 3.4 and higher the GSM 7-bit default alphabet is missing in this list, and data_coding=0 may differ for various Short message service centers—it may be ISO-8859-1, ASCII, GSM 7-bit default alphabet, UTF-8 or even configurable per ESME.
This means that Client class should have a parameter for default encoding.
Hi,
If I try to send a message using gsm0338 codec:
it is not encoded correctly, the client receives garbage ('S&ΛJ/Oi' in this case). If I specify ucs2 encoding, then everything is fine.
It is not a server problem. I've tried sending from https://melroselabs.com/tools/smppclientproxy/ via the same server using gsm0338 and the message was encoded correctly.