We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在使用此过程运行后,使用项目中的Java代码 此org.example.mirai.JavaMain 调用发送消息出现乱码。
Friend friend = bot.getFriend(好友QQ号); String s = new String("测试消息".getBytes("GBK"), "GBK"); String s2 = new String("测试消息".getBytes("UTF8"), "UTF8"); friend.sendMessage(s); friend.sendMessage(s2);
好友接收到为:
The text was updated successfully, but these errors were encountered:
将 IDEA, Gradle设置 等 调整至 UTF-8 编码
Sorry, something went wrong.
谢谢楼上,虽然没有什么用嘿嘿,我的解决办法: //在发送消息时更改字符编码为gbk bot.getFriend(3555824873l).sendMessage(new String("测试".getBytes("GBK")));
bot.getFriend(3555824873l).sendMessage(new String("测试".getBytes("GBK")));
测试开发语言是 Java,其他项目也参考下
No branches or pull requests
在使用此过程运行后,使用项目中的Java代码 此org.example.mirai.JavaMain 调用发送消息出现乱码。
好友接收到为:
![image](https://user-images.githubusercontent.com/54440653/130325731-d1cb1f74-d868-4a27-ad96-f3a1f79cb036.png)
The text was updated successfully, but these errors were encountered: