客户端接收到消息后的转码问题

1月前 101

接收到消息后我这边使用代码:String decodedMessage = new String(message.getPayload(), StandardCharsets.UTF_8); 转码打印但还是乱码:Received message: �������� 请问转码这块有什么特殊要求吗?

最新回复 (3)
  • x86 1月前
    引用 2
    不能这么来做,你参考下textMesaageContent,里面有encode和decode方法
  • 1月前
    引用 3
    x86 不能这么来做,你参考下textMesaageContent,里面有encode和decode方法
    请问这个类在哪个服务勒?我在im-server和android-chat-master都没找到
  • 1月前
    引用 4
    谢谢 找到了
返回