代码中为:
let html = resp.text();
console.log(html)
打印内容包含了如下中文乱码:
希望能读取乱码内容,应该如何解决。即使将乱码输出为base64或url编码也可以。
我测试过用这个提问中的stringToGBK函数,依旧不行 https://airsheet-community.wps.cn/questions/10010000000000675
代码中为:
let html = resp.text();
console.log(html)
打印内容包含了如下中文乱码:
希望能读取乱码内容,应该如何解决。即使将乱码输出为base64或url编码也可以。
我测试过用这个提问中的stringToGBK函数,依旧不行 https://airsheet-community.wps.cn/questions/10010000000000675
const resp = HTTP.get(xxxx)
const body = resp.binary()
const base64 = body.toString("base64")
可以通过这种方式解决