我想通过 SMPP(JSMPP 库)发送带有 unicode 字符的短信。我知道数据编码必须为 8 并且短信长度为 70 个字符。但是当我尝试这个时,我收到带有中文符号的短信。这是我的代码:
ESMClass esmClass = new ESMClass();
GeneralDataCoding coding = new GeneralDataCoding(8)
String text = "üöğçşə ƏIÖĞŞÇÜ";
String p = HexUtil.convertStringToHexString(text);
byte[] textByte = HexUtil.convertHexStringToBytes(p);
String messageId = session.submitShortMessage("CMT",TypeOfNumber.INTERNATIONAL,
NumberingPlanIndicator.UNKNOWN,"1111", TypeOfNumber.INTERNATIONAL,
NumberingPlanIndicator.UNKNOWN, "phone_number", esmClass,
(byte) 0, (byte) 1, timeFormatter.format(new Date()), null,
new RegisteredDelivery(SMSCDeliveryReceipt.DEFAULT),
(byte) 0, coding, (byte) 0, textByte);
在此之后,我收到带有中文符号的消息。怎么了?