MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    Unsolved 求助:mirai中文乱码及图片等识别下载问题

    开发交流
    2
    3
    128
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      greenhandzdl 摸鱼 last edited by

      先贴个code

              globalEventChannel().subscribeAlways<GroupMessageEvent> {
                  file_write_last_line("$dataFolder/groupMessage","${group.id.toString()}.txt","${sender.id.toString()}:${message.contentToString()}")
              }
      

      其中file_write_last_line实际上就是封装了appendFile,但是效果会出现乱码:
      5ce2fe97-24a9-4ac1-a3c3-f01a0367ec13-image.png

      1 Reply Last reply Reply Quote 0
      • G
        greenhandzdl 摸鱼 last edited by

        consoke版本是 id("net.mamoe.mirai-console") version "2.12.0"

        1 Reply Last reply Reply Quote 0
        • Topic has been marked as a question  G greenhandzdl 
        • cssxsh
          cssxsh last edited by

          这和mirai 没关系
          你需要改 idea 的 启动参数,不然 idea 编码和 控制台编码不一样,自然会乱码

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact