uudashr / jsmpp

Java SMPP (Short Message Peer-to-peer Protocol) API
Apache License 2.0
121 stars 118 forks source link

£ sign is not being displayed correctly on handset #58

Closed kamochu closed 4 years ago

kamochu commented 6 years ago

Hello team... I have an issue with some characters being displayed wrongly on the handset.

Sent content: £$%^&96733{}@# Delivered content: B#$%^&96733{}@#

It appears the character £ is being misrepresented.

Below is a sample code block:

String message = "£$%^&*96733{}@#";

String messageId = session.submitShortMessage(
        null,
        TypeOfNumber.ALPHANUMERIC,
        NumberingPlanIndicator.UNKNOWN,
        "Uwiano",
        TypeOfNumber.INTERNATIONAL,
        NumberingPlanIndicator.ISDN,
        "254723624727",
        new ESMClass(),
        (byte) 0,
        (byte) 0,
        null,
        null,
        new RegisteredDelivery(SMSCDeliveryReceipt.DEFAULT),
        (byte) 0,
        new GeneralDataCoding(Alphabet.ALPHA_DEFAULT, MessageClass.CLASS1, false),
        (byte) 0,
        message.getBytes()
);
saad-g commented 4 years ago

Have you tried GSM Charset for encoding your byte stream? Issue could be either on your end or SMSC, if it has a different meaning for that byte.

kamochu commented 4 years ago

This issue was closed. I used Gsm7BitCharset class and all is well now. Apologies for not updating this issue.

Closing the issue now.