buf2str(buffer) {
      
      let  encodedString = String.fromCodePoint.apply(null, new Uint8Array(buffer));
      let decodedString = decodeURIComponent(escape(encodedString));//没有这一步中文会乱码
      console.log(decodedString);
      return decodedString
    },

  时间紧迫,请看代码。亲测有效

相关文章:

  • 2021-10-24
  • 2021-09-19
  • 2022-01-06
  • 2022-12-23
  • 2022-02-08
  • 2021-12-17
  • 2021-11-23
  • 2022-12-23
猜你喜欢
  • 2021-07-07
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2021-12-06
  • 2021-09-06
相关资源
相似解决方案